/
githubmirror
/
ydb-go-sql
Обзор
Документация
Войти
/
githubmirror
/
ydb-go-sql
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
connector.go
65 строк
2 KB
asmyasnikov
split unit and integration tests + upgrade TestFullWorkflow (add scan query use-case)
19 дек 2021, 15:30
19 дек 2021, 15:30
4b38da0
Код
Авторство
О чём код?
package ydb import ( "database/sql/driver" "time" "github.com/ydb-platform/ydb-go-sdk/v3/config" "github.com/ydb-platform/ydb-go-sdk/v3/credentials" "github.com/ydb-platform/ydb-go-sdk/v3/table/options" "github.com/ydb-platform/ydb-go-sdk/v3/trace" "github.com/ydb-platform/ydb-go-sql/internal/connector" ) func Connector(opts ...connector.Option) driver.Connector { return connector.New(legacyDriver, opts...) } func With(opts ...config.Option) connector.Option { return connector.With(opts...) } func WithConnectionString(connection string) connector.Option { return connector.WithConnectionString(connection) } func WithDiscoveryInterval(discoveryInterval time.Duration) connector.Option { return connector.WithDiscoveryInterval(discoveryInterval) } func WithEndpoint(endpoint string) connector.Option { return connector.WithEndpoint(endpoint) } func WithCredentials(creds credentials.Credentials) connector.Option { return connector.WithCredentials(creds) } func WithAnonymousCredentials() connector.Option { return connector.WithAnonymousCredentials() } func WithAccessTokenCredentials(accessToken string) connector.Option { return connector.WithAccessTokenCredentials(accessToken) } func WithDatabase(database string) connector.Option { return connector.WithDatabase(database) } func WithTraceDriver(t trace.Driver) connector.Option { return connector.WithTraceDriver(t) } func WithTraceTable(t trace.Table) connector.Option { return connector.WithTraceTable(t) } func WithDefaultExecDataQueryOption(opts ...options.ExecuteDataQueryOption) connector.Option { return connector.WithDefaultExecDataQueryOption(opts...) } func WithDefaultExecScanQueryOption(opts ...options.ExecuteScanQueryOption) connector.Option { return connector.WithDefaultExecScanQueryOption(opts...) }