Documentation ¶
Index ¶
- func AnnotateStmt(query, marginalia string) string
- type DB
- func (db DB) Begin() (*Tx, error)
- func (db DB) Exec(query string, args ...interface{}) (sqlorig.Result, error)
- func (db DB) ExecContext(ctx context.Context, query string, args ...interface{}) (sqlorig.Result, error)
- func (db DB) Prepare(query string) (*sqlorig.Stmt, error)
- func (db DB) PrepareContext(ctx context.Context, query string) (*sqlorig.Stmt, error)
- func (db DB) Query(query string, args ...interface{}) (*sqlorig.Rows, error)
- func (db DB) QueryContext(ctx context.Context, query string, args ...interface{}) (*sqlorig.Rows, error)
- func (db DB) QueryRow(query string, args ...interface{}) *sqlorig.Row
- func (db DB) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sqlorig.Row
- type Tx
- func (tx Tx) Exec(query string, args ...interface{}) (sqlorig.Result, error)
- func (tx Tx) ExecContext(ctx context.Context, query string, args ...interface{}) (sqlorig.Result, error)
- func (tx Tx) Prepare(query string) (*sqlorig.Stmt, error)
- func (tx Tx) PrepareContext(ctx context.Context, query string) (*sqlorig.Stmt, error)
- func (tx Tx) Query(query string, args ...interface{}) (*sqlorig.Rows, error)
- func (tx Tx) QueryContext(ctx context.Context, query string, args ...interface{}) (*sqlorig.Rows, error)
- func (tx Tx) QueryRow(query string, args ...interface{}) *sqlorig.Row
- func (tx Tx) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sqlorig.Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotateStmt ¶
AnnotateStmt annotates a single SQL statement with the configured marginalia.
*NOTE* This is NOT SAFE to use with multiple SQL statements as it naively annotates the single query string provided and does not attempt to parse the provided SQL
Types ¶
Click to show internal directories.
Click to hide internal directories.