package xsql
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/xsql"
Index ¶
- Constants
- Variables
- 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 Connection
- type Connector
- func Open(d Driver, connection Connection, opts ...ConnectorOption) (_ *Connector, err error)
- func Unwrap(db *sql.DB) (connector *Connector, err error)
- func (c *Connector) Close() (err error)
- func (c *Connector) Connect(ctx context.Context) (driver.Conn, error)
- func (c *Connector) Connection() Connection
- func (c *Connector) Driver() driver.Driver
- 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
- type Driver
- type QueryMode
Constants ¶
const ( UnknownQueryMode = iota DataQueryMode ExplainQueryMode ScanQueryMode SchemeQueryMode ScriptingQueryMode DefaultQueryMode = DataQueryMode )
Variables ¶
Functions ¶
func WithDataQueryOptions ¶
func WithDataQueryOptions(ctx context.Context, opts ...options.ExecuteDataQueryOption) context.Context
func WithQueryMode ¶
WithQueryMode returns a copy of context with given QueryMode
func WithScanQueryOptions ¶
func WithScanQueryOptions(ctx context.Context, opts ...options.ExecuteScanQueryOption) context.Context
func WithTxControl ¶
Types ¶
type Connection ¶
type Connection interface { // Table returns table client Table() table.Client // Scripting returns scripting client Scripting() scripting.Client // Close closes connection and clear resources Close(ctx context.Context) error }
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 Unwrap ¶
func (*Connector) Close ¶
func (*Connector) Connect ¶
func (*Connector) Connection ¶
func (c *Connector) Connection() Connection
func (*Connector) Driver ¶
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
type Driver ¶
type QueryMode ¶
type QueryMode int
func QueryModeFromString ¶
func (QueryMode) String ¶
Source Files ¶
bad_conn_go1.18.go conn.go connector.go context.go dsn.go errors.go mode.go rows.go stmt.go xsql.go
Directories ¶
Path | Synopsis |
---|---|
internal/xsql/isolation |
- Version
- v3.33.0
- Published
- Aug 10, 2022
- Platform
- linux/amd64
- Imports
- 22 packages
- Last checked
- 6 minutes ago –
Tools for package owners.