Versions in this module Expand all Collapse all v0 v0.2.1 Apr 3, 2023 v0.2.0 Apr 2, 2023 Changes in this version type Logger + WarnErrSkip bool v0.1.0 Apr 2, 2023 Changes in this version + func NewDriver(d driver.Driver, logger Logger) driver.Driver + func NewUID() string + type Conn struct + func NewConn(conn driver.Conn, logger Logger) *Conn + func (c *Conn) Begin() (_ driver.Tx, err error) + func (c *Conn) BeginTx(ctx context.Context, opts driver.TxOptions) (_ driver.Tx, err error) + func (c *Conn) CheckNamedValue(namedValue *driver.NamedValue) (err error) + func (c *Conn) Close() (err error) + func (c *Conn) Exec(query string, args []driver.Value) (_ driver.Result, err error) + func (c *Conn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Result, err error) + func (c *Conn) Ping(ctx context.Context) (err error) + func (c *Conn) Prepare(query string) (_ driver.Stmt, err error) + func (c *Conn) PrepareContext(ctx context.Context, query string) (_ driver.Stmt, err error) + func (c *Conn) Query(query string, args []driver.Value) (_ driver.Rows, err error) + func (c *Conn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (_ driver.Rows, err error) + func (c *Conn) ResetSession(ctx context.Context) (err error) + type Connector struct + func NewConnector(dsn string, d driver.Driver, logger Logger) *Connector + func (c *Connector) Connect(ctx context.Context) (_ driver.Conn, err error) + func (c *Connector) Driver() driver.Driver + type Driver struct + func (d *Driver) Open(name string) (driver.Conn, error) + func (d *Driver) OpenConnector(name string) (driver.Connector, error) + type Logger struct + BaseLevel slog.Level + BasePrefix string + StmtPrefix string + TxPrefix string + WithDuration bool + func (l Logger) Log(ctx context.Context, level slog.Level, msg string, started time.Time, ...) + func (l Logger) With(attrs ...any) Logger + type Stmt struct + func NewStmt(stmt driver.Stmt, query string, logger Logger) *Stmt + func (s *Stmt) CheckNamedValue(namedValue *driver.NamedValue) (err error) + func (s *Stmt) Close() (err error) + func (s *Stmt) Exec(args []driver.Value) (_ driver.Result, err error) + func (s *Stmt) ExecContext(ctx context.Context, args []driver.NamedValue) (_ driver.Result, err error) + func (s *Stmt) NumInput() int + func (s *Stmt) Query(args []driver.Value) (_ driver.Rows, err error) + func (s *Stmt) QueryContext(ctx context.Context, args []driver.NamedValue) (_ driver.Rows, err error) + type Tx struct + func NewTx(tx driver.Tx, logger Logger) *Tx + func (t *Tx) Commit() (err error) + func (t *Tx) Rollback() (err error)