dbutils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

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

func InitDB

func InitDB(dbNames []string)

func InitTestDB

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

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