db

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2020 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDBEngine

func CreateDBEngine() (engine *xorm.Engine, err error)

CreateDBEngine initializes a db engine from the config

func CreateTestEngine

func CreateTestEngine() (engine *xorm.Engine, err error)

CreateTestEngine creates an instance of the db engine which lives in memory

func InitFixtures

func InitFixtures(tablenames ...string) (err error)

InitFixtures initialize test fixtures for a test database

func InitTestFixtures

func InitTestFixtures(tablenames ...string) (err error)

InitTestFixtures populates the db with all fixtures from the fixtures folder

func LoadAndAssertFixtures

func LoadAndAssertFixtures(t *testing.T)

LoadAndAssertFixtures loads all fixtures defined before and asserts they are correctly loaded

func LoadFixtures

func LoadFixtures() error

LoadFixtures load fixtures for a test database

func RegisterTableStructsForCache

func RegisterTableStructsForCache(val interface{})

RegisterTableStructsForCache registers tables in gob encoding for redis cache

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL