package
Version:
v1.9.1
Opens a new window with list of versions in this module.
Published: Nov 6, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 11
Opens a new window with list of known importers.
Documentation
¶
func CloseDb() (err error)
CloseDb closes the connection to MySQL
GetDb returns a connection to MySQL
GetTransaction will return a transaction
func NewTestDb() (mock sqlmock.Sqlmock, err error)
NewTestDb gets a database mock for testing
Ping checks if the database connection is alive
Database holds the connection options
NewDb initializes a connection to MySQL and tries to connect.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.