Documentation ¶
Index ¶
- func NewDriver(c Config, d driver.Driver) driver.Driver
- type Config
- type Hook
- func (h *Hook) AfterBeginTx(ctx context.Context, _ driver.TxOptions, dd driver.Tx, err error) (context.Context, driver.Tx, error)
- func (h *Hook) AfterClose(ctx context.Context, err error) (context.Context, error)
- func (h *Hook) AfterCommit(ctx context.Context, err error) (context.Context, error)
- func (h *Hook) AfterConnect(ctx context.Context, dc driver.Conn, err error) (context.Context, driver.Conn, error)
- func (h *Hook) AfterExecContext(ctx context.Context, _ string, _ []driver.NamedValue, r driver.Result, ...) (context.Context, driver.Result, error)
- func (h *Hook) AfterPrepareContext(ctx context.Context, _ string, s driver.Stmt, err error) (context.Context, driver.Stmt, error)
- func (h *Hook) AfterQueryContext(ctx context.Context, _ string, _ []driver.NamedValue, rows driver.Rows, ...) (context.Context, driver.Rows, error)
- func (h *Hook) AfterRollback(ctx context.Context, err error) (context.Context, error)
- func (h *Hook) AfterStmtExecContext(ctx context.Context, _ string, _ []driver.NamedValue, r driver.Result, ...) (context.Context, driver.Result, error)
- func (h *Hook) AfterStmtQueryContext(ctx context.Context, _ string, _ []driver.NamedValue, rows driver.Rows, ...) (context.Context, driver.Rows, error)
- func (h *Hook) BeforeBeginTx(ctx context.Context, opts driver.TxOptions, err error) (context.Context, driver.TxOptions, error)
- func (h *Hook) BeforeClose(ctx context.Context, err error) (context.Context, error)
- func (h *Hook) BeforeCommit(ctx context.Context, err error) (context.Context, error)
- func (h *Hook) BeforeConnect(ctx context.Context, err error) (context.Context, error)
- func (h *Hook) BeforeExecContext(ctx context.Context, query string, args []driver.NamedValue, err error) (context.Context, string, []driver.NamedValue, error)
- func (h *Hook) BeforePrepareContext(ctx context.Context, query string, err error) (context.Context, string, error)
- func (h *Hook) BeforeQueryContext(ctx context.Context, query string, args []driver.NamedValue, err error) (context.Context, string, []driver.NamedValue, error)
- func (h *Hook) BeforeRollback(ctx context.Context, err error) (context.Context, error)
- func (h *Hook) BeforeStmtExecContext(ctx context.Context, query string, args []driver.NamedValue, err error) (context.Context, []driver.NamedValue, error)
- func (h *Hook) BeforeStmtQueryContext(ctx context.Context, query string, args []driver.NamedValue, err error) (context.Context, []driver.NamedValue, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
DataSourceName string
}
Config represents a tracing configuration.
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
func NewTraceHook ¶
func (*Hook) AfterBeginTx ¶
func (*Hook) AfterClose ¶ added in v0.2.0
func (*Hook) AfterCommit ¶
func (*Hook) AfterConnect ¶
func (*Hook) AfterExecContext ¶
func (*Hook) AfterPrepareContext ¶
func (*Hook) AfterQueryContext ¶
func (*Hook) AfterRollback ¶
func (*Hook) AfterStmtExecContext ¶
func (*Hook) AfterStmtQueryContext ¶
func (*Hook) BeforeBeginTx ¶
func (*Hook) BeforeClose ¶ added in v0.2.0
func (*Hook) BeforeCommit ¶
func (*Hook) BeforeConnect ¶
func (*Hook) BeforeExecContext ¶
func (*Hook) BeforePrepareContext ¶
func (*Hook) BeforeQueryContext ¶
func (*Hook) BeforeRollback ¶
func (*Hook) BeforeStmtExecContext ¶
func (*Hook) BeforeStmtQueryContext ¶
Click to show internal directories.
Click to hide internal directories.