Discover Packages
github.com/golang-tire/auth
internal
pkg
db
package
Version:
v0.0.0-...-f2fa0db
Opens a new window with list of versions in this module.
Published: Jan 23, 2021
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func CreateSchema(db *gorm .DB , models []interface{}) error
CreateSchema creates database schema for test
ResetTables truncates all data in the specified tables.
DB represents a DB connection that can be used to run SQL queries.
func NewForTest(t *testing .T , models []interface{}) *DB
NewForTest returns the database connection for testing purpose.
DB returns the dbx.DB wrapped by this object.
With returns a Builder that can be used to build and execute SQL queries.
With will return the transaction if it is found in the given context.
Otherwise it will return a DB connection associated with the context.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.