Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { Query(ctx context.Context, result interface{}, filter sqlgen.Filter, options *sqlgen.SelectOptions) error QueryRow(ctx context.Context, result interface{}, filter sqlgen.Filter, options *sqlgen.SelectOptions) error InsertRow(ctx context.Context, row interface{}) (sql.Result, error) UpsertRow(ctx context.Context, row interface{}) (sql.Result, error) UpdateRow(ctx context.Context, row interface{}) error DeleteRow(ctx context.Context, row interface{}) error }
DB is an interface that satisfies both sqlgen.DB and LiveDB
type DBGenerator ¶
type DBGenerator struct { Name string Generator func(t *testing.T) (db DB, sqlDB *sql.DB, close func()) }
DBGenerator is a struct that contains the ability to build a database.
func NewDBGenerators ¶
func NewDBGenerators(dbSetup func(testDB *testfixtures.TestDatabase, schema *sqlgen.Schema) error) []DBGenerator
NewDBGenerators is a function that will return a list of database "generators" which own the lifecycle of a database (both live and sqlgen)
Click to show internal directories.
Click to hide internal directories.