package conn
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/table/conn"
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 Conn
- func New(ctx context.Context, parent Parent, s table.ClosableSession, opts ...Option) *Conn
- func (c *Conn) Begin() (driver.Tx, error)
- func (c *Conn) BeginTx(ctx context.Context, txOptions driver.TxOptions) (driver.Tx, error)
- func (c *Conn) CheckNamedValue(*driver.NamedValue) error
- func (c *Conn) Close() (finalErr error)
- func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Result, _ error)
- func (c *Conn) ID() string
- func (c *Conn) IsValid() bool
- 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, query string) (_ driver.Stmt, finalErr error)
- func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Rows, _ error)
- func (c *Conn) WithDataQueryOptions(ctx context.Context, opts ...options.ExecuteDataQueryOption) context.Context
- func (c *Conn) WithScanQueryOptions(ctx context.Context, opts ...options.ExecuteScanQueryOption) context.Context
- type Option
- func WithDataOpts(dataOpts ...options.ExecuteDataQueryOption) Option
- func WithDefaultQueryMode(mode QueryMode) Option
- func WithDefaultTxControl(defaultTxControl *table.TransactionControl) Option
- func WithFakeTxModes(modes ...QueryMode) Option
- func WithIdleThreshold(idleThreshold time.Duration) Option
- func WithOnClose(onCLose func()) Option
- func WithScanOpts(scanOpts ...options.ExecuteScanQueryOption) Option
- type Parent
- type QueryMode
Constants ¶
const ( UnknownQueryMode = QueryMode(iota) DataQueryMode ExplainQueryMode ScanQueryMode SchemeQueryMode ScriptingQueryMode DefaultQueryMode = DataQueryMode )
Variables ¶
Functions ¶
func WithQueryMode ¶
WithQueryMode returns a copy of context with given QueryMode
func WithTxControl ¶
func WithTxControlHook ¶
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func New ¶
func (*Conn) Begin ¶
func (*Conn) BeginTx ¶
func (*Conn) CheckNamedValue ¶
func (c *Conn) CheckNamedValue(*driver.NamedValue) error
func (*Conn) Close ¶
func (*Conn) ExecContext ¶
func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Result, _ error)
func (*Conn) ID ¶
func (*Conn) IsValid ¶
func (*Conn) LastUsage ¶
func (*Conn) Ping ¶
func (*Conn) Prepare ¶
func (*Conn) PrepareContext ¶
func (*Conn) QueryContext ¶
func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Rows, _ error)
func (*Conn) WithDataQueryOptions ¶
func (c *Conn) WithDataQueryOptions(ctx context.Context, opts ...options.ExecuteDataQueryOption) context.Context
func (*Conn) WithScanQueryOptions ¶
func (c *Conn) WithScanQueryOptions(ctx context.Context, opts ...options.ExecuteScanQueryOption) context.Context
type Option ¶
type Option func(*Conn)
func WithDataOpts ¶
func WithDataOpts(dataOpts ...options.ExecuteDataQueryOption) Option
func WithDefaultQueryMode ¶
func WithDefaultTxControl ¶
func WithDefaultTxControl(defaultTxControl *table.TransactionControl) Option
func WithFakeTxModes ¶
func WithIdleThreshold ¶
func WithOnClose ¶
func WithOnClose(onCLose func()) Option
func WithScanOpts ¶
func WithScanOpts(scanOpts ...options.ExecuteScanQueryOption) Option
type Parent ¶
type Parent interface { Table() table.Client Scripting() scripting.Client Trace() *trace.DatabaseSQL TraceRetry() *trace.Retry RetryBudget() budget.Budget Bindings() bind.Bindings Clock() clockwork.Clock }
type QueryMode ¶
type QueryMode int
func QueryModeFromString ¶
func (QueryMode) String ¶
Source Files ¶
conn.go context.go errors.go mode.go options.go rows.go stmt.go tx.go tx_fake.go valuer.go
Directories ¶
Path | Synopsis |
---|---|
internal/table/conn/badconn | |
internal/table/conn/isolation |
- Version
- v3.92.4
- Published
- Nov 15, 2024
- Platform
- linux/amd64
- Imports
- 28 packages
- Last checked
- 5 minutes ago –
Tools for package owners.