Documentation ¶
Index ¶
- Constants
- Variables
- func WithQueryMode(ctx context.Context, m QueryMode) context.Context
- func WithTxControl(ctx context.Context, txc *table.TransactionControl) context.Context
- type Connector
- type ConnectorOption
- func Parse(dataSourceName string) (opts []config.Option, connectorOpts []ConnectorOption, err error)
- func WithBindings(bindings ...bind.Binding) ConnectorOption
- func WithCreateSession(f func(ctx context.Context) (s table.ClosableSession, err error)) ConnectorOption
- func WithDatabaseName(databaseName string) ConnectorOption
- func WithDefaultDataQueryOptions(opts ...options.ExecuteDataQueryOption) ConnectorOption
- func WithDefaultQueryMode(mode QueryMode) ConnectorOption
- func WithDefaultScanQueryOptions(opts ...options.ExecuteScanQueryOption) ConnectorOption
- func WithDefaultTxControl(txControl *table.TransactionControl) ConnectorOption
- func WithDescribePath(f func(ctx context.Context, path string) (e scheme.Entry, err error)) ConnectorOption
- func WithDisableServerBalancer() ConnectorOption
- func WithIdleThreshold(idleThreshold time.Duration) ConnectorOption
- func WithListDirectory(f func(ctx context.Context, path string) (d scheme.Directory, err error)) ConnectorOption
- func WithOnClose(f func(connector *Connector)) ConnectorOption
- func WithScriptingExecute(...) ConnectorOption
- func WithTrace(t trace.DatabaseSQL, opts ...trace.DatabaseSQLComposeOption) ConnectorOption
- type QueryMode
Constants ¶
View Source
const ( UnknownQueryMode = 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 Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector is a producer of database/sql connections
func Open ¶
func Open(opts ...ConnectorOption) (_ *Connector, err error)
type ConnectorOption ¶
func Parse ¶
func Parse(dataSourceName string) (opts []config.Option, connectorOpts []ConnectorOption, err error)
func WithBindings ¶
func WithBindings(bindings ...bind.Binding) ConnectorOption
func WithCreateSession ¶
func WithCreateSession(f func(ctx context.Context) (s table.ClosableSession, err error)) ConnectorOption
func WithDatabaseName ¶
func WithDatabaseName(databaseName string) ConnectorOption
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 WithDescribePath ¶
func WithDisableServerBalancer ¶ added in v3.42.4
func WithDisableServerBalancer() ConnectorOption
func WithIdleThreshold ¶ added in v3.42.5
func WithIdleThreshold(idleThreshold time.Duration) ConnectorOption
func WithListDirectory ¶
func WithOnClose ¶ added in v3.44.0
func WithOnClose(f func(connector *Connector)) ConnectorOption
func WithScriptingExecute ¶
func WithScriptingExecute(scriptingExecute func( ctx context.Context, query string, params *table.QueryParameters) (result.StreamResult, error), ) ConnectorOption
func WithTrace ¶ added in v3.34.0
func WithTrace(t trace.DatabaseSQL, opts ...trace.DatabaseSQLComposeOption) ConnectorOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.