Skip to content

Commit 79cccb7

Browse files
committed
add megration table of contents
1 parent ae0fb6c commit 79cccb7

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

MIGRATION_v2_v3.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22

33
> Article contains some cases for migrate from `github.com/yandex-cloud/ydb-go-sdk/v2` to `github.com/ydb-platform/ydb-go-sdk/v3`
44
5-
## Imports
5+
## Table of contents
6+
1. [Imports](#imports)
7+
2. [Connect to `YDB` by `endpoint` and `database`](#connect)
8+
3. [Connect to `YDB` using connection string](#connect-dsn)
9+
4. [Make table client and session pool](#table-client)
10+
5. [Execute query with table client and session pool](#execute-queries)
11+
6. [Scans query result into local variables](#scan-result)
12+
7. [Logging SDK's events](#logs)
13+
8. [Add metrics obout SDK's events](#metrics)
14+
9. [Add `Jaeger` traces about SDK's events](#jaeger)
15+
16+
## Imports <a name="imports"></a>
617
- in `v2`:
718
```
819
"github.com/yandex-cloud/ydb-go-sdk/v2"
@@ -14,7 +25,7 @@
1425
"github.com/ydb-platform/ydb-go-sdk/v3/table"
1526
```
1627

17-
## Connect to `YDB` by `endpoint` and `database`
28+
## Connect to `YDB` by `endpoint` and `database` <a name="connect"></a>
1829
- in `v2`:
1930
```go
2031
config := &ydb.DriverConfig{
@@ -47,7 +58,7 @@
4758
}()
4859
```
4960

50-
## Connect to `YDB` using connection string
61+
## Connect to `YDB` using connection string <a name="connect-dsn"></a>
5162
- in `v2`:
5263
```go
5364
import (
@@ -78,7 +89,7 @@
7889
}()
7990
```
8091

81-
## Make table client and session pool
92+
## Make table client and session pool <a name="table-client"></a>
8293
- in `v2`:
8394
```go
8495
import (
@@ -97,7 +108,7 @@
97108
```
98109
- in `v3`: nothing to do, table client with internal session pool always available with `db.Table()`
99110

100-
## Execute query with table client and session pool
111+
## Execute query with table client and session pool <a name="execute-queries"></a>
101112
- in `v2`:
102113
```go
103114
var res *table.Result
@@ -132,7 +143,7 @@
132143
}
133144
```
134145

135-
## Scans query result into local variables
146+
## Scans query result into local variables <a name="scan-result"></a>
136147
- in `v2`:
137148
```go
138149
var (
@@ -205,7 +216,7 @@
205216
}
206217
```
207218

208-
## Logging SDK's events
219+
## Logging SDK's events <a name="logs"></a>
209220
- in `v2`:
210221
```go
211222
config.Trace = ydb.DriverTrace{
@@ -248,7 +259,7 @@
248259
)
249260
```
250261

251-
## Add metrics obout SDK's events
262+
## Add metrics obout SDK's events <a name="metrics"></a>
252263
- in `v2`:
253264
```go
254265
config.Trace = ydb.DriverTrace{
@@ -272,7 +283,7 @@
272283
```
273284
* metrics to other monitoring systems may be add with common package `"github.com/ydb-platform/ydb-go-sdk-metrics"`
274285
275-
## Add `Jaeger` traces about SDK's events
286+
## Add `Jaeger` traces about SDK's events <a name="jaeger"></a>
276287
- in `v2`:
277288
```go
278289
config.Trace = ydb.DriverTrace{

0 commit comments

Comments
 (0)