Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateDeclareSection(args []sql.NamedArg) (string, error)
- func ToYdbParam(param sql.NamedArg) (table.ParameterOption, error)
- func WithDataQueryOptions(ctx context.Context, opts ...options.ExecuteDataQueryOption) context.Context
- func WithQueryMode(ctx context.Context, m QueryMode) context.Context
- func WithScanQueryOptions(ctx context.Context, opts ...options.ExecuteScanQueryOption) 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 WithDefaultDataQueryOptions(opts ...options.ExecuteDataQueryOption) ConnectorOption
- func WithDefaultQueryMode(mode QueryMode) ConnectorOption
- func WithDefaultScanQueryOptions(opts ...options.ExecuteScanQueryOption) ConnectorOption
- func WithDefaultTxControl(txControl *table.TransactionControl) ConnectorOption
- func WithTrace(t trace.DatabaseSQL, opts ...trace.DatabaseSQLComposeOption) ConnectorOption
- type Driver
- type QueryMode
Constants ¶
View Source
const ( UnknownQueryMode = iota DataQueryMode ExplainQueryMode ScanQueryMode SchemeQueryMode ScriptingQueryMode DefaultQueryMode = DataQueryMode )
Variables ¶
View Source
var (
ErrUnsupported = driver.ErrSkip
)
Functions ¶
func GenerateDeclareSection ¶ added in v3.36.2
GenerateDeclareSection generates DECLARE section text in YQL query by params
Warning: This is an experimental feature and could change at any time
func ToYdbParam ¶ added in v3.38.0
func ToYdbParam(param sql.NamedArg) (table.ParameterOption, error)
func WithDataQueryOptions ¶
func WithQueryMode ¶
WithQueryMode returns a copy of context with given QueryMode
func WithScanQueryOptions ¶
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(d Driver, connection connection, opts ...ConnectorOption) (_ *Connector, err error)
func (*Connector) Connection ¶
func (c *Connector) Connection() connection
type ConnectorOption ¶
func Parse ¶
func Parse(dataSourceName string) (opts []config.Option, connectorOpts []ConnectorOption, err 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 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.