Documentation ¶
Index ¶
- func WrapConnector(conn driver.Connector, itpr Interceptor) driver.Connector
- type Conn
- type Interceptor
- type NullInterceptor
- func (NullInterceptor) ConnBeginTx(ctx context.Context, conn driver.ConnBeginTx, txOpts driver.TxOptions) (driver.Tx, error)
- func (NullInterceptor) ConnExecContext(ctx context.Context, conn driver.ExecerContext, query string, ...) (driver.Result, error)
- func (NullInterceptor) ConnPing(ctx context.Context, conn driver.Pinger) error
- func (NullInterceptor) ConnPrepareContext(ctx context.Context, conn driver.ConnPrepareContext, query string) (driver.Stmt, error)
- func (NullInterceptor) ConnQueryContext(ctx context.Context, conn driver.QueryerContext, query string, ...) (driver.Rows, error)
- func (NullInterceptor) ResultLastInsertId(ctx context.Context, res driver.Result) (int64, error)
- func (NullInterceptor) ResultRowsAffected(ctx context.Context, res driver.Result) (int64, error)
- func (NullInterceptor) RowsNext(ctx context.Context, rows driver.Rows, dest []driver.Value) error
- func (NullInterceptor) StmtClose(ctx context.Context, stmt driver.Stmt) error
- func (NullInterceptor) StmtExecContext(ctx context.Context, stmt driver.StmtExecContext, _ string, ...) (driver.Result, error)
- func (NullInterceptor) StmtQueryContext(ctx context.Context, stmt driver.StmtQueryContext, _ string, ...) (driver.Rows, error)
- func (NullInterceptor) TxCommit(ctx context.Context, tx driver.Tx) error
- func (NullInterceptor) TxRollback(ctx context.Context, tx driver.Tx) error
- type Result
- type Rows
- type Stmt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapConnector ¶
func WrapConnector(conn driver.Connector, itpr Interceptor) driver.Connector
WrapConnector :
Types ¶
type Conn ¶
type Conn interface { driver.Conn driver.Pinger driver.ConnBeginTx driver.ConnPrepareContext driver.ExecerContext driver.QueryerContext }
Conn :
type Interceptor ¶
type Interceptor interface { // Connection interceptors ConnPing(context.Context, driver.Pinger) error ConnBeginTx(context.Context, driver.ConnBeginTx, driver.TxOptions) (driver.Tx, error) ConnPrepareContext(context.Context, driver.ConnPrepareContext, string) (driver.Stmt, error) ConnExecContext(context.Context, driver.ExecerContext, string, []driver.NamedValue) (driver.Result, error) ConnQueryContext(context.Context, driver.QueryerContext, string, []driver.NamedValue) (driver.Rows, error) // Results interceptors ResultLastInsertId(context.Context, driver.Result) (int64, error) ResultRowsAffected(context.Context, driver.Result) (int64, error) // Rows interceptors RowsNext(context.Context, driver.Rows, []driver.Value) error // Stmt interceptors StmtExecContext(context.Context, driver.StmtExecContext, string, []driver.NamedValue) (driver.Result, error) StmtQueryContext(context.Context, driver.StmtQueryContext, string, []driver.NamedValue) (driver.Rows, error) StmtClose(context.Context, driver.Stmt) error // Tx interceptors TxCommit(context.Context, driver.Tx) error TxRollback(context.Context, driver.Tx) error }
Interceptor :
type NullInterceptor ¶
type NullInterceptor struct{}
NullInterceptor is a complete passthrough interceptor that implements every method of the Interceptor interface and performs no additional logic. Users should Embed it in their own interceptor so that they only need to define the specific functions they are interested in intercepting.
func (NullInterceptor) ConnBeginTx ¶
func (NullInterceptor) ConnBeginTx(ctx context.Context, conn driver.ConnBeginTx, txOpts driver.TxOptions) (driver.Tx, error)
ConnBeginTx :
func (NullInterceptor) ConnExecContext ¶
func (NullInterceptor) ConnExecContext(ctx context.Context, conn driver.ExecerContext, query string, args []driver.NamedValue) (driver.Result, error)
ConnExecContext :
func (NullInterceptor) ConnPrepareContext ¶
func (NullInterceptor) ConnPrepareContext(ctx context.Context, conn driver.ConnPrepareContext, query string) (driver.Stmt, error)
ConnPrepareContext :
func (NullInterceptor) ConnQueryContext ¶
func (NullInterceptor) ConnQueryContext(ctx context.Context, conn driver.QueryerContext, query string, args []driver.NamedValue) (driver.Rows, error)
ConnQueryContext :
func (NullInterceptor) ResultLastInsertId ¶
ResultLastInsertId :
func (NullInterceptor) ResultRowsAffected ¶
ResultRowsAffected :
func (NullInterceptor) StmtExecContext ¶
func (NullInterceptor) StmtExecContext(ctx context.Context, stmt driver.StmtExecContext, _ string, args []driver.NamedValue) (driver.Result, error)
StmtExecContext :
func (NullInterceptor) StmtQueryContext ¶
func (NullInterceptor) StmtQueryContext(ctx context.Context, stmt driver.StmtQueryContext, _ string, args []driver.NamedValue) (driver.Rows, error)
StmtQueryContext :
func (NullInterceptor) TxRollback ¶
TxRollback :
type Rows ¶
type Rows interface { driver.RowsNextResultSet ColumnTypeScanType(index int) reflect.Type }
Rows :
type Stmt ¶
type Stmt interface { driver.Stmt driver.StmtExecContext driver.StmtQueryContext }
Stmt :
Click to show internal directories.
Click to hide internal directories.