-
Notifications
You must be signed in to change notification settings - Fork 0
/
pgxschema_test.go
45 lines (40 loc) · 955 Bytes
/
pgxschema_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package pgxschema
import (
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgxpool"
)
// Interface verification that pgx.Conn and pgxpool.Pool both satisfy our
// Connection interface
var (
_ Connection = &pgx.Conn{}
_ Connection = &pgxpool.Pool{}
)
// Interface verification that pgx.Conn and pgxpool.Pool both satisfy our
// Transactor interface
var (
_ Transactor = &pgx.Conn{}
_ Transactor = &pgxpool.Pool{}
)
// Interface verification that pgx.Conn, pgxpool.Pool and pgx.Tx all support
// our Queryer interface.
var (
_ Queryer = &pgx.Conn{}
_ Queryer = &pgxpool.Pool{}
_ Queryer = pgx.Tx(nil)
)
// TestDBs holds all of the specific database instances against which tests
// will run.
var TestDBs = map[string]*TestDB{
"postgres:11": {
DockerRepo: "postgres",
DockerTag: "11",
},
"postgres:12": {
DockerRepo: "postgres",
DockerTag: "12",
},
"postgres:latest": {
DockerRepo: "postgres",
DockerTag: "latest",
},
}