package xsql
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/xsql"
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 Open(parent ydbDriver, balancer grpc.ClientConnInterface, opts ...Option) (_ *Connector, err error)
- func Unwrap[T *sql.DB | *sql.Conn](v T) (connector *Connector, _ error)
- 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
- func WithQueryBind(bind bind.Bind) QueryBindOption
- func WithTablePathPrefix(tablePathPrefix string) 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 ¶
const ( QUERY_SERVICE = iota + 1 //nolint:revive,stylecheck LEGACY //nolint:revive,stylecheck )
Variables ¶
Functions ¶
func WithExplain ¶
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) Begin ¶
func (*Conn) BeginTx ¶
func (*Conn) CheckNamedValue ¶
func (c *Conn) CheckNamedValue(value *driver.NamedValue) (finalErr error)
func (*Conn) Close ¶
func (*Conn) Engine ¶
func (*Conn) ExecContext ¶
func (c *Conn) ExecContext(ctx context.Context, sql string, args []driver.NamedValue) ( _ driver.Result, finalErr error, )
func (*Conn) GetColumnType ¶
func (c *Conn) GetColumnType(ctx context.Context, tableName, columnName string) (dataType string, _ error)
func (*Conn) GetColumns ¶
func (*Conn) GetDatabaseName ¶
func (*Conn) GetIndexColumns ¶
func (c *Conn) GetIndexColumns(ctx context.Context, tableName, indexName string) (columns []string, finalErr error)
func (*Conn) GetIndexes ¶
func (*Conn) GetPrimaryKeys ¶
func (*Conn) GetTables ¶
func (c *Conn) GetTables(ctx context.Context, folder string, recursive, excludeSysDirs bool) ( tables []string, _ error, )
func (*Conn) IsColumnExists ¶
func (c *Conn) IsColumnExists(ctx context.Context, tableName, columnName string) (columnExists bool, finalErr error)
func (*Conn) IsPrimaryKey ¶
func (*Conn) IsTableExists ¶
func (c *Conn) IsTableExists(ctx context.Context, tableName string) (tableExists bool, finalErr error)
func (*Conn) LastUsage ¶
func (*Conn) Ping ¶
func (*Conn) Prepare ¶
func (*Conn) PrepareContext ¶
func (*Conn) QueryContext ¶
func (c *Conn) QueryContext(ctx context.Context, sql string, args []driver.NamedValue) ( _ driver.Rows, finalErr error, )
func (*Conn) Version ¶
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 Unwrap ¶
func (*Connector) Bindings ¶
func (*Connector) Clock ¶
func (*Connector) Close ¶
func (*Connector) Connect ¶
func (*Connector) Driver ¶
func (*Connector) Name ¶
func (*Connector) Open ¶
func (*Connector) Parent ¶
func (c *Connector) Parent() ydbDriver
func (*Connector) Query ¶
func (*Connector) RetryBudget ¶
func (*Connector) Scheme ¶
func (*Connector) Scripting ¶
func (*Connector) Table ¶
func (*Connector) Trace ¶
func (c *Connector) Trace() *trace.DatabaseSQL
func (*Connector) TraceRetry ¶
type Engine ¶
type Engine uint8
func (Engine) String ¶
type Option ¶
func Merge ¶
func WithDefaultQueryMode ¶
func WithDisableServerBalancer ¶
func WithDisableServerBalancer() Option
func WithFakeTx ¶
func WithIdleThreshold ¶
func WithOnClose ¶
func WithQueryOptions ¶
func WithQueryService ¶
func WithRetryBudget ¶
func WithTableOptions ¶
func WithTrace ¶
func WithTrace( t *trace.DatabaseSQL, opts ...trace.DatabaseSQLComposeOption, ) Option
func WithTraceRetry ¶
func WithTraceRetry( t *trace.Retry, opts ...trace.RetryComposeOption, ) Option
type QueryBindOption ¶
func WithQueryBind ¶
func WithQueryBind(bind bind.Bind) QueryBindOption
func WithTablePathPrefix ¶
func WithTablePathPrefix(tablePathPrefix string) QueryBindOption
type Stmt ¶
type Stmt struct {
// contains filtered or unexported fields
}
func (*Stmt) Close ¶
func (*Stmt) Exec ¶
func (*Stmt) ExecContext ¶
func (stmt *Stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (_ driver.Result, finalErr error)
func (*Stmt) NumInput ¶
func (*Stmt) Query ¶
func (*Stmt) QueryContext ¶
func (stmt *Stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (_ driver.Rows, finalErr error)
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func (*Tx) Commit ¶
func (*Tx) ExecContext ¶
func (tx *Tx) ExecContext(ctx context.Context, sql string, args []driver.NamedValue) ( _ driver.Result, finalErr error, )
func (*Tx) ID ¶
func (*Tx) PrepareContext ¶
func (*Tx) QueryContext ¶
func (tx *Tx) QueryContext(ctx context.Context, sql string, args []driver.NamedValue) ( _ driver.Rows, finalErr error, )
func (*Tx) Rollback ¶
Source Files ¶
conn.go conn_helpers.go connector.go context.go errors.go options.go rows.go stmt.go tx.go unwrap.go
Directories ¶
Path | Synopsis |
---|---|
internal/xsql/iface | |
internal/xsql/legacy | |
internal/xsql/legacy/badconn | |
internal/xsql/propose |
- Version
- v3.95.4
- Published
- Dec 23, 2024
- Platform
- linux/amd64
- Imports
- 36 packages
- Last checked
- 55 seconds ago –
Tools for package owners.