Documentation ¶
Index ¶
- type DB
- func (db *DB) Check(ctx context.Context) error
- func (db *DB) Close() error
- func (db *DB) Exec(ctx context.Context, query string, args ...interface{}) error
- func (db *DB) Get(ctx context.Context, dest interface{}, query string, args ...interface{}) (bool, error)
- func (db *DB) Select(ctx context.Context, dest interface{}, query string, args ...interface{}) error
- func (db *DB) Tx(ctx context.Context, fn func(*Tx) error) error
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) Check ¶
Check verifies database integrity. Check runs in O(N log N) time, where N is the database size.
func (*DB) Get ¶
func (db *DB) Get(ctx context.Context, dest interface{}, query string, args ...interface{}) (bool, error)
Get executes a query that is expected to return at most one row.
Click to show internal directories.
Click to hide internal directories.