/
githubmirror
/
ydb-go-sdk
Обзор
Документация
Войти
/
githubmirror
/
ydb-go-sdk
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
internal/xsql/common/rows.go
27 строк
880 B
Aleksey Myasnikov
refactoring for better perf: replaced done signal channels to `atomic.Bool`, simlpified internals of database/sql driver and query-client (#2148)
11 май 2026, 22:25
Не верифицирован
11 май 2026, 22:25
be40ba3
Код
Авторство
О чём код?
package common import ( "context" "database/sql/driver" ) // Rows is the internal abstraction for query results between xquery / xtable and // the database/sql facade in internal/xsql. Iteration respects the caller's // context (QueryContext deadline / cancel). // // The driver-facing shapes (driver.Rows without context arguments on Next, // RowsNextResultSet, optional column typing interfaces, etc.) are implemented // only in internal/xsql, which pins QueryContext onto every Rows call site. type Rows interface { Columns(ctx context.Context) []string ColumnTypeDatabaseTypeName(ctx context.Context, index int) string ColumnTypeNullable(ctx context.Context, index int) (nullable, ok bool) Next(ctx context.Context, dst []driver.Value) error NextResultSet(ctx context.Context) error HasNextResultSet(ctx context.Context) bool Close(ctx context.Context) error }