Documentation ¶
Index ¶
- func GetClient() *sql.DB
- func GetGormClient() *gorm.DB
- func Init(Driver, DBUser, DBPassword, DBHost, DBName string) (*sql.DB, error)
- func MockGorm() (*gorm.DB, sqlmock.Sqlmock)
- func MockSql() (*sql.DB, sqlmock.Sqlmock)
- func New(Driver string, DBUser string, DBPassword string, DBHost string, DBName string) (*sql.DB, error)
- func NewGorm(sqlDB *sql.DB) (*gorm.DB, error)
- func WrapWithGorm(sqlDB *sql.DB) (*gorm.DB, error)
- type AnyTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGormClient ¶
GetGormClient returns globally cached gormClient.
func Init ¶
Init creates a client pool for sql connections. Driver must be one of these https://golang.org/s/sqldrivers.
func New ¶ added in v0.10.5
func New(Driver string, DBUser string, DBPassword string, DBHost string, DBName string) (*sql.DB, error)
New creates brand new sql client
Types ¶
Click to show internal directories.
Click to hide internal directories.