Documentation
¶
Overview ¶
Package hobbled allows creation of hobbled or deficient database types to facilitate testing within sqlh.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WithoutBegin ¶
type WithoutBegin interface {
Exec(query string, args ...interface{}) (sql.Result, error)
ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
Prepare(query string) (*sql.Stmt, error)
PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
Query(query string, args ...interface{}) (*sql.Rows, error)
QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryRow(query string, args ...interface{}) *sql.Row
QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
}
WithoutBegin has no Begin call.
func NewWithoutBegin ¶
func NewWithoutBegin(db interface{}) WithoutBegin
NewWithoutBegin returns a WithoutBegin type.
type WithoutBeginWithoutPrepare ¶
type WithoutBeginWithoutPrepare interface {
Exec(query string, args ...interface{}) (sql.Result, error)
ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
Query(query string, args ...interface{}) (*sql.Rows, error)
QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryRow(query string, args ...interface{}) *sql.Row
QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
}
WithoutBeginWithoutPrepare has no Begin or Prepare calls.
func NewWithoutBeginWithoutPrepare ¶
func NewWithoutBeginWithoutPrepare(db interface{}) WithoutBeginWithoutPrepare
NewWithoutBeginWithoutPrepare returns a WithoutBeginWithoutPrepare type.
type WithoutPrepare ¶
type WithoutPrepare interface {
Begin() (*sql.Tx, error)
Exec(query string, args ...interface{}) (sql.Result, error)
ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
Query(query string, args ...interface{}) (*sql.Rows, error)
QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
QueryRow(query string, args ...interface{}) *sql.Row
QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
}
WithoutPrepare has no Prepare calls.
func NewWithoutPrepare ¶
func NewWithoutPrepare(db interface{}) WithoutPrepare
NewWithoutPrepare returns a WithoutPrepare type.
Click to show internal directories.
Click to hide internal directories.