orm

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown      = ""
	UnknownYear  = -1
	UnknownMonth = -1
	UnknownDay   = -1
	UnknownName  = "Unknown"
	UnknownTitle = UnknownName
	UnknownID    = "zz"
)

Defaults.

View Source
const (
	Created = "created"
	Updated = "updated"
	Deleted = "deleted"
)

Event types.

Variables

View Source
var (
	ErrDBNotconnected   = errors.New("migrate: database not connected")
	ErrDBTypeNotSupport = errors.New("migrate: database type not support")
)

Functions

func NewMySQL

func NewMySQL(cfg config.DBConfig) gorm.Dialector

func NewPostgres

func NewPostgres(cfg config.DBConfig) gorm.Dialector

func NewSqlite3

func NewSqlite3(cfg config.DBConfig) gorm.Dialector

func Register

func Register(name config.DBTYPE, adapter Instance)

func String2Map added in v1.6.2

func String2Map(str string) map[string]string

[?param1=value1&...&paramN=valueN]

Types

type DBConn

type DBConn struct {
	// contains filtered or unexported fields
}

func NewDBConn

func NewDBConn(cfg config.DBConfig) (*DBConn, error)

func (*DBConn) Close

func (g *DBConn) Close() error

type Instance

type Instance func(cfg config.DBConfig) gorm.Dialector

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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