Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoHost occurs when host is not provided in configuration ErrNoHost = errors.New("no host for database connection") // ErrNoTransaction occurs when no transaction is provided but needed ErrNoTransaction = errors.New("no transaction in context, please wrap with DoAtomic()") // ErrBulkEnded occurs when bulk creation is over ErrBulkEnded = errors.New("no more data to copy") // SQLTimeout when running queries SQLTimeout = time.Second * 5 )
Functions ¶
Types ¶
type App ¶ added in v4.14.0
type App interface {
Ping() error
Close() error
DoAtomic(ctx context.Context, action func(context.Context) error) error
List(ctx context.Context, scanner func(*sql.Rows) error, query string, args ...interface{}) error
Get(ctx context.Context, scanner func(*sql.Row) error, query string, args ...interface{}) error
Create(ctx context.Context, query string, args ...interface{}) (uint64, error)
Exec(ctx context.Context, query string, args ...interface{}) error
Bulk(ctx context.Context, feeder func(*sql.Stmt) error, schema, table string, columns ...string) error
}
App of package
Click to show internal directories.
Click to hide internal directories.