Documentation ¶
Index ¶
- type Fixture
- type Pgpool
- func (p *Pgpool) WithEmpty(t testing.TB) *pgxpool.Pool
- func (p *Pgpool) WithFixtures(t testing.TB, fixtures []Fixture) *pgxpool.Pool
- func (p *Pgpool) WithSQLs(t testing.TB, sqls []string) *pgxpool.Pool
- func (p *Pgpool) WithStdEmpty(t testing.TB) *sql.DB
- func (p *Pgpool) WithStdFixtures(t testing.TB, fixtures []Fixture) *sql.DB
- func (p *Pgpool) WithStdSQLs(t testing.TB, sqls []string) *sql.DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pgpool ¶
type Pgpool struct { // BaseName is the prefix of template and temporary databases. // Default is dbtestpg. BaseName string // Name of schema file. If empty, create empty database. SchemaFile string // schema file name // If true, skip all database tests. Skip bool // contains filtered or unexported fields }
func (*Pgpool) WithEmpty ¶
WithEmpty creates empty database from template database, that was created from `schema` file.
func (*Pgpool) WithFixtures ¶
WithFixtures creates database from template database, and initializes it with fixtures from `fixtures` array
func (*Pgpool) WithSQLs ¶
WithSQLs creates database from template database, and initializes it with fixtures from `sqls` array
func (*Pgpool) WithStdEmpty ¶
WithStdEmpty creates empty database from template database, that was created from `schema` file.
func (*Pgpool) WithStdFixtures ¶
WithStdFixtures creates database from template database, and initializes it with fixtures from `fixtures` array
Click to show internal directories.
Click to hide internal directories.