Documentation
¶
Index ¶
- func AssertExists(t *testing.T, table string, values map[string]interface{}, custom bool)
- func AssertMissing(t *testing.T, table string, values map[string]interface{})
- func CreateDBEngine() (engine *xorm.Engine, err error)
- func CreateTestEngine() (engine *xorm.Engine, err error)
- func Dump() (data map[string][]byte, err error)
- func InitFixtures(tablenames ...string) (err error)
- func InitTestFixtures(tablenames ...string) (err error)
- func LoadAndAssertFixtures(t *testing.T)
- func LoadFixtures() error
- func NewSession() *xorm.Session
- func RegisterTableStructsForCache(val interface{})
- func Restore(table string, contents []map[string]interface{}) (err error)
- func RestoreAndTruncate(table string, contents []map[string]interface{}) (err error)
- func Type() schemas.DBType
- func WipeEverything() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertExists ¶ added in v0.15.0
AssertExists checks and asserts the existence of certain entries in the db
func AssertMissing ¶ added in v0.15.0
AssertMissing checks and asserts the nonexiste nce of certain entries in the db
func CreateDBEngine ¶
CreateDBEngine initializes a db engine from the config
func CreateTestEngine ¶
CreateTestEngine creates an instance of the db engine which lives in memory
func InitFixtures ¶
InitFixtures initialize test fixtures for a test database
func InitTestFixtures ¶
InitTestFixtures populates the db with all fixtures from the fixtures folder
func LoadAndAssertFixtures ¶
LoadAndAssertFixtures loads all fixtures defined before and asserts they are correctly loaded
func NewSession ¶ added in v0.16.0
NewSession creates a new xorm session
func RegisterTableStructsForCache ¶
func RegisterTableStructsForCache(val interface{})
RegisterTableStructsForCache registers tables in gob encoding for redis cache
func RestoreAndTruncate ¶ added in v0.16.0
RestoreAndTruncate removes all content from the table before restoring it from the contents map
func WipeEverything ¶ added in v0.14.0
func WipeEverything() error
WipeEverything wipes all tables and their data. Use with caution...
Types ¶
This section is empty.