conn

package
v3.93.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, parent Parent, s *query.Session, opts ...Option) *Conn

func (*Conn) Begin

func (c *Conn) Begin() (driver.Tx, error)

func (*Conn) BeginTx

func (c *Conn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)

func (*Conn) CheckNamedValue

func (c *Conn) CheckNamedValue(value *driver.NamedValue) error

func (*Conn) Close

func (c *Conn) Close() (finalErr error)

func (*Conn) ExecContext

func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

func (*Conn) ID

func (c *Conn) ID() string

func (*Conn) IsValid

func (c *Conn) IsValid() bool

func (*Conn) LastUsage

func (c *Conn) LastUsage() time.Time

func (*Conn) Ping

func (c *Conn) Ping(ctx context.Context) error

func (*Conn) Prepare

func (c *Conn) Prepare(query string) (driver.Stmt, error)

func (*Conn) PrepareContext

func (c *Conn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error)

func (*Conn) QueryContext

func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)

type Option

type Option func(c *Conn)

func WithOnClose

func WithOnClose(onClose func()) Option

type Parent

type Parent interface {
	Query() *query.Client
	Trace() *trace.DatabaseSQL
	TraceRetry() *trace.Retry
	RetryBudget() budget.Budget
	Bindings() bind.Bindings
	Clock() clockwork.Clock
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL