database

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Sqlite = "sqlite"

Variables

This section is empty.

Functions

func InitDB

func InitDB(driver DriverType, dsn string) (err error)

func NewSqlite3

func NewSqlite3(dsn string) (*gorm.DB, error)

Types

type DriverType added in v0.2.1

type DriverType = string
var (
	DB     *gorm.DB
	Driver DriverType
)

type ListField

type ListField []string

func (*ListField) Scan

func (f *ListField) Scan(data interface{}) error

func (ListField) Value

func (f ListField) Value() (driver.Value, error)

type MapField

type MapField map[string]string

func (*MapField) Scan

func (f *MapField) Scan(data interface{}) error

func (MapField) Value

func (f MapField) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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