dbutils

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB(name string) (db *gorm.DB)

func InitDB added in v1.1.0

func InitDB(dbNames []string)

func InitTestDB added in v1.0.1

func InitTestDB(name string, db *gorm.DB) error

InitTestDB will init the mock DB and lock the db so that the actual db will not be required.

func ReadDB

func ReadDB(name string) *gorm.DB

func ReleaseTestDB added in v1.0.1

func ReleaseTestDB()

ReleaseTestDB is to release the lock for other unit tests to mock db successfully.

func WriteDB

func WriteDB(name string) *gorm.DB

Types

This section is empty.

Jump to

Keyboard shortcuts

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