Documentation ¶
Index ¶
- Variables
- func OpenTestPoolLibPQ(t testing.TB) adapter.ConnPool
- func OpenTestPoolLibPQCustomSchemas(t testing.TB, gueSchema, secondSchema string) adapter.ConnPool
- func OpenTestPoolMaxConnsLibPQ(t testing.TB, maxConnections int, gueSchema, secondSchema string) adapter.ConnPool
- func OpenTestPoolMaxConnsPGXv4(t testing.TB, maxConnections int32) adapter.ConnPool
- func OpenTestPoolMaxConnsPGXv5(t testing.TB, maxConnections int32) adapter.ConnPool
- func OpenTestPoolPGXv4(t testing.TB) adapter.ConnPool
- func OpenTestPoolPGXv5(t testing.TB) adapter.ConnPool
- type CommandTag
- type Conn
- type ConnPool
- type OpenOpenTestPoolMaxConns
- type OpenTestPool
- type Queryable
- type Row
- type Rows
- type Tx
Constants ¶
This section is empty.
Variables ¶
var AllAdaptersOpenTestPool = map[string]OpenTestPool{ "pgx/v4": OpenTestPoolPGXv4, "pgx/v5": OpenTestPoolPGXv5, "lib/pq": OpenTestPoolLibPQ, }
AllAdaptersOpenTestPool lists all available adapters with callbacks
Functions ¶
func OpenTestPoolLibPQ ¶
OpenTestPoolLibPQ opens connections pool used in testing
func OpenTestPoolLibPQCustomSchemas ¶
OpenTestPoolLibPQCustomSchemas opens connections pool used in testing with gue table installed to own schema and search_path set to two different schemas
func OpenTestPoolMaxConnsLibPQ ¶
func OpenTestPoolMaxConnsLibPQ(t testing.TB, maxConnections int, gueSchema, secondSchema string) adapter.ConnPool
OpenTestPoolMaxConnsLibPQ opens connections pool used in testing
func OpenTestPoolMaxConnsPGXv4 ¶
OpenTestPoolMaxConnsPGXv4 opens connections pool used in testing
func OpenTestPoolMaxConnsPGXv5 ¶
OpenTestPoolMaxConnsPGXv5 opens connections pool used in testing
func OpenTestPoolPGXv4 ¶
OpenTestPoolPGXv4 opens connections pool used in testing
Types ¶
type CommandTag ¶
CommandTag mock implementation of adapter.CommandTag
func (*CommandTag) RowsAffected ¶
func (m *CommandTag) RowsAffected() int64
RowsAffected mock implementation of adapter.CommandTag.RowsAffected()
type Conn ¶
Conn mock implementation of adapter.Conn
type ConnPool ¶
ConnPool mock implementation of adapter.ConnPool
type OpenOpenTestPoolMaxConns ¶
OpenOpenTestPoolMaxConns callback type for opening connection pool with custom max connections used in tests
type OpenTestPool ¶
OpenTestPool callback type for opening connection pool with default parameters used in tests
type Queryable ¶
Queryable mock implementation of adapter.Queryable
func (*Queryable) Exec ¶
func (m *Queryable) Exec(ctx context.Context, query string, args ...any) (adapter.CommandTag, error)
Exec mock implementation of adapter.Queryable.Exec()