Documentation ¶
Index ¶
- Constants
- Variables
- func WithExplain(ctx context.Context) context.Context
- type Conn
- func (c *Conn) Begin() (_ driver.Tx, finalErr error)
- func (c *Conn) BeginTx(ctx context.Context, opts driver.TxOptions) (_ driver.Tx, finalErr error)
- func (c *Conn) CheckNamedValue(value *driver.NamedValue) (finalErr error)
- func (c *Conn) Close() (finalErr error)
- func (c *Conn) Engine() Engine
- func (c *Conn) ExecContext(ctx context.Context, sql string, args []driver.NamedValue) (_ driver.Result, finalErr error)
- func (c *Conn) GetColumnType(ctx context.Context, tableName, columnName string) (dataType string, _ error)
- func (c *Conn) GetColumns(ctx context.Context, tableName string) (columns []string, _ error)
- func (c *Conn) GetDatabaseName() string
- func (c *Conn) GetIndexColumns(ctx context.Context, tableName, indexName string) (columns []string, finalErr error)
- func (c *Conn) GetIndexes(ctx context.Context, tableName string) (indexes []string, _ error)
- func (c *Conn) GetPrimaryKeys(ctx context.Context, tableName string) ([]string, error)
- func (c *Conn) GetTables(ctx context.Context, folder string, recursive, excludeSysDirs bool) (tables []string, _ error)
- func (c *Conn) IsColumnExists(ctx context.Context, tableName, columnName string) (columnExists bool, finalErr error)
- func (c *Conn) IsPrimaryKey(ctx context.Context, tableName, columnName string) (ok bool, _ error)
- func (c *Conn) IsTableExists(ctx context.Context, tableName string) (tableExists bool, finalErr error)
- func (c *Conn) LastUsage() time.Time
- func (c *Conn) Ping(ctx context.Context) (finalErr error)
- func (c *Conn) Prepare(string) (driver.Stmt, error)
- func (c *Conn) PrepareContext(ctx context.Context, sql string) (_ driver.Stmt, finalErr error)
- func (c *Conn) QueryContext(ctx context.Context, sql string, args []driver.NamedValue) (_ driver.Rows, finalErr error)
- func (c *Conn) Version(_ context.Context) (_ string, _ error)
- type Connector
- func (c *Connector) Bindings() bind.Bindings
- func (c *Connector) Clock() clockwork.Clock
- func (c *Connector) Close() error
- func (c *Connector) Connect(ctx context.Context) (driver.Conn, error)
- func (c *Connector) Driver() driver.Driver
- func (c *Connector) Name() string
- func (c *Connector) Open(name string) (driver.Conn, error)
- func (c *Connector) Parent() ydbDriver
- func (c *Connector) Query() *query.Client
- func (c *Connector) RetryBudget() budget.Budget
- func (c *Connector) Scheme() scheme.Client
- func (c *Connector) Scripting() scripting.Client
- func (c *Connector) Table() table.Client
- func (c *Connector) Trace() *trace.DatabaseSQL
- func (c *Connector) TraceRetry() *trace.Retry
- type Engine
- type Option
- func Merge(opts ...Option) Option
- func WithDefaultQueryMode(mode legacy.QueryMode) Option
- func WithDisableServerBalancer() Option
- func WithFakeTx(modes ...legacy.QueryMode) Option
- func WithIdleThreshold(idleThreshold time.Duration) Option
- func WithOnClose(onClose func(*Connector)) Option
- func WithQueryOptions(opts ...propose.Option) Option
- func WithQueryService(b bool) Option
- func WithRetryBudget(budget budget.Budget) Option
- func WithTableOptions(opts ...legacy.Option) Option
- func WithTrace(t *trace.DatabaseSQL, opts ...trace.DatabaseSQLComposeOption) Option
- func WithTraceRetry(t *trace.Retry, opts ...trace.RetryComposeOption) Option
- type QueryBindOption
- type Stmt
- func (stmt *Stmt) Close() (finalErr error)
- func (stmt *Stmt) Exec([]driver.Value) (driver.Result, error)
- func (stmt *Stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (_ driver.Result, finalErr error)
- func (stmt *Stmt) NumInput() int
- func (stmt *Stmt) Query([]driver.Value) (driver.Rows, error)
- func (stmt *Stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (_ driver.Rows, finalErr error)
- type Tx
- func (tx *Tx) Commit() (finalErr error)
- func (tx *Tx) ExecContext(ctx context.Context, sql string, args []driver.NamedValue) (_ driver.Result, finalErr error)
- func (tx *Tx) ID() string
- func (tx *Tx) PrepareContext(ctx context.Context, sql string) (_ driver.Stmt, finalErr error)
- func (tx *Tx) QueryContext(ctx context.Context, sql string, args []driver.NamedValue) (_ driver.Rows, finalErr error)
- func (tx *Tx) Rollback() (finalErr error)
Constants ¶
View Source
const ( QUERY_SERVICE = iota + 1 //nolint:revive,stylecheck LEGACY //nolint:revive,stylecheck )
Variables ¶
View Source
var (
ErrUnsupported = driver.ErrSkip
)
Functions ¶
Types ¶
type Conn ¶ added in v3.95.0
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) CheckNamedValue ¶ added in v3.95.0
func (c *Conn) CheckNamedValue(value *driver.NamedValue) (finalErr error)
func (*Conn) ExecContext ¶ added in v3.95.0
func (*Conn) GetColumnType ¶ added in v3.95.0
func (*Conn) GetColumns ¶ added in v3.95.0
func (*Conn) GetDatabaseName ¶ added in v3.95.0
func (*Conn) GetIndexColumns ¶ added in v3.95.0
func (*Conn) GetIndexes ¶ added in v3.95.0
func (*Conn) GetPrimaryKeys ¶ added in v3.95.0
func (*Conn) IsColumnExists ¶ added in v3.95.0
func (*Conn) IsPrimaryKey ¶ added in v3.95.0
func (*Conn) IsTableExists ¶ added in v3.95.0
func (*Conn) PrepareContext ¶ added in v3.95.0
func (*Conn) QueryContext ¶ added in v3.95.0
type Connector ¶
type Connector struct { LegacyOpts []legacy.Option Options []propose.Option // contains filtered or unexported fields }
func Open ¶
func Open(parent ydbDriver, balancer grpc.ClientConnInterface, opts ...Option) (_ *Connector, err error)
func (*Connector) RetryBudget ¶ added in v3.95.0
func (*Connector) Trace ¶ added in v3.95.0
func (c *Connector) Trace() *trace.DatabaseSQL
func (*Connector) TraceRetry ¶ added in v3.95.0
type Option ¶ added in v3.95.0
func WithDefaultQueryMode ¶
func WithDisableServerBalancer ¶ added in v3.42.4
func WithDisableServerBalancer() Option
func WithFakeTx ¶ added in v3.44.0
func WithIdleThreshold ¶ added in v3.42.5
func WithOnClose ¶ added in v3.44.0
func WithQueryOptions ¶ added in v3.95.0
func WithQueryService ¶ added in v3.95.0
func WithRetryBudget ¶ added in v3.95.0
func WithTableOptions ¶ added in v3.95.0
func WithTrace ¶ added in v3.34.0
func WithTrace( t *trace.DatabaseSQL, opts ...trace.DatabaseSQLComposeOption, ) Option
func WithTraceRetry ¶ added in v3.54.0
func WithTraceRetry( t *trace.Retry, opts ...trace.RetryComposeOption, ) Option
type QueryBindOption ¶ added in v3.95.0
func WithQueryBind ¶ added in v3.44.0
func WithQueryBind(bind bind.Bind) QueryBindOption
func WithTablePathPrefix ¶ added in v3.44.0
func WithTablePathPrefix(tablePathPrefix string) QueryBindOption
type Stmt ¶ added in v3.95.0
type Stmt struct {
// contains filtered or unexported fields
}
func (*Stmt) ExecContext ¶ added in v3.95.0
func (*Stmt) QueryContext ¶ added in v3.95.0
type Tx ¶ added in v3.95.0
type Tx struct {
// contains filtered or unexported fields
}
func (*Tx) ExecContext ¶ added in v3.95.0
func (*Tx) PrepareContext ¶ added in v3.95.0
func (*Tx) QueryContext ¶ added in v3.95.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.