db

package
v0.0.0-...-5c0bb04 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mysql    = "mysql"
	Postgres = "postgres"
	Mssql    = "mssql"
	Sqlite3  = "sqlite3"
	Tidb     = "tidb"
)

database type

Variables

This section is empty.

Functions

func Close

func Close()

Close sql db connect

func DSN

func DSN() (dsn string, err error)

DSN return parsed DSN

func Init

func Init()

Init for db

func Instance

func Instance() *gorm.DB

Instance return a opened *gorm.DB

Types

type Logger

type Logger struct{}

func (*Logger) Printf

func (l *Logger) Printf(format string, args ...interface{})

Jump to

Keyboard shortcuts

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