Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func MustBeginTx ¶
Types ¶
type NewDBOption ¶ added in v0.0.57
type NewDBOption interface {
// contains filtered or unexported methods
}
func WithNewDBOptionStructTag ¶ added in v0.0.57
func WithNewDBOptionStructTag(structTag string) NewDBOption
type QueryerContext ¶ added in v0.0.57
type QueryerContext interface {
// QueryContext executes a query that returns rows, typically a SELECT.
//
// The dst must be a pointer.
// The args are for any placeholder parameters in the query.
QueryContext(ctx context.Context, dst interface{}, query string, args ...interface{}) error
// QueryRowContext executes a query that is expected to return at most one row.
// It always returns a non-nil value or an error.
//
// The dst must be a pointer.
// The args are for any placeholder parameters in the query.
QueryRowContext(ctx context.Context, dst interface{}, query string, args ...interface{}) error
}
func NewDB ¶
func NewDB(db sqlQueryerContext, opts ...NewDBOption) QueryerContext
Click to show internal directories.
Click to hide internal directories.