Documentation ¶
Index ¶
- Variables
- func BunDB(t *testing.T) *bun.DB
- func BunTx(t *testing.T) *bun.DB
- func DB(t *testing.T) *sql.DB
- func DSN() string
- func Expire(duration time.Duration) func(*config) error
- func Hook(fn func(*sql.DB) error) func(*config) error
- func Image(image string) func(*config) error
- func Init(opts ...Option) func()
- func New(t *testing.T, opts ...Option) *testClient
- func Tx(t *testing.T) *sql.DB
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var Error = errors.New("pgtest")
Functions ¶
func DB ¶
DB returns a non-transaction *sql.DB. The reason is there is a need for testing stuff that should not be in the same transactions, e.g. when generating current_timestamp, or locking in different connection.
Types ¶
Click to show internal directories.
Click to hide internal directories.