Documentation ¶
Index ¶
- Constants
- Variables
- func WithQueryMode(ctx context.Context, m QueryMode) context.Context
- func WithTxControl(ctx context.Context, txc *table.TransactionControl) context.Context
- func WithTxControlHook(ctx context.Context, hook txControlHook) context.Context
- type ConnAlreadyHaveTxError
- type Connector
- type ConnectorOption
- func Parse(dataSourceName string) (opts []config.Option, connectorOpts []ConnectorOption, _ error)
- func WithDefaultDataQueryOptions(opts ...options.ExecuteDataQueryOption) ConnectorOption
- func WithDefaultQueryMode(mode QueryMode) ConnectorOption
- func WithDefaultScanQueryOptions(opts ...options.ExecuteScanQueryOption) ConnectorOption
- func WithDefaultTxControl(txControl *table.TransactionControl) ConnectorOption
- func WithDisableServerBalancer() ConnectorOption
- func WithFakeTx(m QueryMode) ConnectorOption
- func WithIdleThreshold(idleThreshold time.Duration) ConnectorOption
- func WithOnClose(f func(connector *Connector)) ConnectorOption
- func WithTrace(t *trace.DatabaseSQL, opts ...trace.DatabaseSQLComposeOption) ConnectorOption
- func WithTraceRetry(t *trace.Retry) ConnectorOption
- type QueryBindConnectorOption
- type QueryMode
Constants ¶
View Source
const ( UnknownQueryMode = QueryMode(iota) DataQueryMode ExplainQueryMode ScanQueryMode SchemeQueryMode ScriptingQueryMode DefaultQueryMode = DataQueryMode )
Variables ¶
View Source
var (
ErrUnsupported = driver.ErrSkip
)
Functions ¶
func WithQueryMode ¶
WithQueryMode returns a copy of context with given QueryMode
func WithTxControl ¶
Types ¶
type ConnAlreadyHaveTxError ¶ added in v3.57.0
type ConnAlreadyHaveTxError struct {
// contains filtered or unexported fields
}
func (*ConnAlreadyHaveTxError) As ¶ added in v3.57.0
func (err *ConnAlreadyHaveTxError) As(target interface{}) bool
func (*ConnAlreadyHaveTxError) Error ¶ added in v3.57.0
func (err *ConnAlreadyHaveTxError) Error() string
type Connector ¶
Connector is a producer of database/sql connections
func Open ¶
func Open(parent ydbDriver, opts ...ConnectorOption) (_ *Connector, err error)
type ConnectorOption ¶
func Parse ¶
func Parse(dataSourceName string) (opts []config.Option, connectorOpts []ConnectorOption, _ error)
func WithDefaultDataQueryOptions ¶
func WithDefaultDataQueryOptions(opts ...options.ExecuteDataQueryOption) ConnectorOption
func WithDefaultQueryMode ¶
func WithDefaultQueryMode(mode QueryMode) ConnectorOption
func WithDefaultScanQueryOptions ¶
func WithDefaultScanQueryOptions(opts ...options.ExecuteScanQueryOption) ConnectorOption
func WithDefaultTxControl ¶
func WithDefaultTxControl(txControl *table.TransactionControl) ConnectorOption
func WithDisableServerBalancer ¶ added in v3.42.4
func WithDisableServerBalancer() ConnectorOption
func WithFakeTx ¶ added in v3.44.0
func WithFakeTx(m QueryMode) ConnectorOption
WithFakeTx returns a copy of context with given QueryMode
func WithIdleThreshold ¶ added in v3.42.5
func WithIdleThreshold(idleThreshold time.Duration) ConnectorOption
func WithOnClose ¶ added in v3.44.0
func WithOnClose(f func(connector *Connector)) ConnectorOption
func WithTrace ¶ added in v3.34.0
func WithTrace(t *trace.DatabaseSQL, opts ...trace.DatabaseSQLComposeOption) ConnectorOption
func WithTraceRetry ¶ added in v3.54.0
func WithTraceRetry(t *trace.Retry) ConnectorOption
type QueryBindConnectorOption ¶ added in v3.44.0
type QueryBindConnectorOption interface { ConnectorOption bind.Bind }
func WithQueryBind ¶ added in v3.44.0
func WithQueryBind(bind bind.Bind) QueryBindConnectorOption
func WithTablePathPrefix ¶ added in v3.44.0
func WithTablePathPrefix(tablePathPrefix string) QueryBindConnectorOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.