Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func Connect ¶ added in v0.1.3
Connect opens a database and verifies it is reachable with a ping. It never returns a half-open DB: on failure sqlDB is closed before returning the error.
func (*DB) TransactionOpts ¶ added in v0.1.3
func (d *DB) TransactionOpts(ctx context.Context, opts *TransactionOpts, fn func(tx *Tx) error) error
TransactionOpts runs fn inside a transaction configured per opts.
type TransactionOpts ¶ added in v0.1.3
type TransactionOpts struct {
Isolation sql.IsolationLevel
ReadOnly bool
}
TransactionOpts mirrors database/sql TxOptions. A nil *TransactionOpts means the database driver's default isolation level and read-write access.
Click to show internal directories.
Click to hide internal directories.