Documentation ¶
Index ¶
- func Wrap(d driver.Driver) driver.Driver
- type ConnWrapper
- func (c *ConnWrapper) Begin() (driver.Tx, error)
- func (c *ConnWrapper) BeginTx(ctx context.Context, opts driver.TxOptions) (tx driver.Tx, err error)
- func (c *ConnWrapper) Close() error
- func (c *ConnWrapper) Exec(query string, args []driver.Value) (res driver.Result, err error)
- func (c *ConnWrapper) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (res driver.Result, err error)
- func (c *ConnWrapper) Ping(ctx context.Context) (err error)
- func (c *ConnWrapper) Prepare(query string) (driver.Stmt, error)
- func (c *ConnWrapper) PrepareContext(ctx context.Context, query string) (stmt driver.Stmt, err error)
- func (c *ConnWrapper) Query(query string, args []driver.Value) (rows driver.Rows, err error)
- func (c *ConnWrapper) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (rows driver.Rows, err error)
- type DriverWrapper
- type StmtWrapper
- func (s StmtWrapper) Close() (err error)
- func (s StmtWrapper) Exec(args []driver.Value) (res driver.Result, err error)
- func (s StmtWrapper) ExecContext(ctx context.Context, args []driver.NamedValue) (res driver.Result, err error)
- func (s StmtWrapper) NumInput() int
- func (s StmtWrapper) Query(args []driver.Value) (rows driver.Rows, err error)
- func (s StmtWrapper) QueryContext(ctx context.Context, args []driver.NamedValue) (rows driver.Rows, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnWrapper ¶
ConnWrapper wraps sql driver.Conn
func (*ConnWrapper) Begin ¶
func (c *ConnWrapper) Begin() (driver.Tx, error)
Begin starts and returns a new transaction
func (*ConnWrapper) BeginTx ¶
BeginTx starts and returns a new transaction with context and and TxOptions
func (*ConnWrapper) ExecContext ¶
func (c *ConnWrapper) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (res driver.Result, err error)
ExecContext wraps the driver.ExecerContext.ExecContext and starts a new span. The newly created span will be a child of the span whose context is is passed using the ctx parameter
func (*ConnWrapper) Ping ¶
func (c *ConnWrapper) Ping(ctx context.Context) (err error)
Ping wraps driver.Pinger.Ping
func (*ConnWrapper) Prepare ¶
func (c *ConnWrapper) Prepare(query string) (driver.Stmt, error)
Prepare creates a prepared statement and wraps it
func (*ConnWrapper) PrepareContext ¶
func (c *ConnWrapper) PrepareContext(ctx context.Context, query string) (stmt driver.Stmt, err error)
PrepareContext creates a prepared statement and wraps it
func (*ConnWrapper) QueryContext ¶
func (c *ConnWrapper) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (rows driver.Rows, err error)
QueryContext wraps the driver.Queryer.Query and starts a new span. The newly created span will be a child of the span whose context is is passed using the ctx parameter
type DriverWrapper ¶
DriverWrapper wraps sql driver.Driver
type StmtWrapper ¶
StmtWrapper wraps sql driver.Stmt with context
func (StmtWrapper) ExecContext ¶
func (s StmtWrapper) ExecContext(ctx context.Context, args []driver.NamedValue) (res driver.Result, err error)
ExecContext wraps the driver.StmtExecContext.ExecContext and starts a new span. The newly created span will be a child of the span whose context is is passed using the ctx parameter
func (StmtWrapper) NumInput ¶
func (s StmtWrapper) NumInput() int
NumInput wraps driver.Stmt.NumInput
func (StmtWrapper) QueryContext ¶
func (s StmtWrapper) QueryContext(ctx context.Context, args []driver.NamedValue) (rows driver.Rows, err error)
QueryContext wraps the driver.StmtQueryContext.QueryContext and starts a new span. The newly created span will be a child of the span whose context is is passed using the ctx parameter