You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4.[Retryers for `YDB``database/sql` driver](#retry)
15
+
*[Over `sql.Conn` object](#retry-conn)
16
+
*[Over `sql.Tx`](#retry-tx)
14
17
15
18
## Initialization of `database/sql` driver <aname="init"></a>
16
19
@@ -78,14 +81,13 @@ for rows.Next() { // iterate over rows
78
81
if err = rows.Err(); err != nil { // always check final rows err
79
82
log.Fatal(err)
80
83
}
81
-
82
84
```
83
85
84
86
### With transaction <aname="queries-tx"></a>
85
-
Supports only `default` transaction options which mapped to `YDB`'s`SerializableReadWrite` transaction settings.
87
+
Supports only `default` transaction options which mapped to `YDB``SerializableReadWrite` transaction settings.
86
88
`YDB`'s `OnlineReadOnly` and `StaleReadOnly` transaction settings are not compatible with interactive transactions such as `database/sql`'s `*sql.Tx`.
87
89
`YDB`'s `OnlineReadOnly` and `StaleReadOnly` transaction settings can be explicitly applied to each query outside interactive transaction (see more in [Isolation levels support](#tx-control))
The `YDB` server API is currently requires to select a specific method by specific request type. For example, `DDL` must be called with `table.session.ExecuteSchemeQuery`, `DML` must be called with `table.session.Execute`, `DQL` may be called with `table.session.Execute` or `table.session.StreamExecuteScanQuery` etc. `YDB` have a `scripting` service also, which provides different query types with single method, but not supports transactions.
122
124
123
-
Thats why needs to select query mode on client side currently.
125
+
That's why needs to select query mode on client side currently.
124
126
125
127
`YDB` team have a roadmap goal to implements a single method for executing different query types.
126
128
@@ -132,16 +134,108 @@ Thats why needs to select query mode on client side currently.
132
134
*`ydb.ScriptingQueryMode` - for `DDL`, `DML`, `DQL` queries (not a `TCL`). Be careful: queries executes longer than with other query modes and consumes bigger server-side resources
0 commit comments