cgDb

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbExecute

func DbExecute(fn GetDbFn, dest interface{}, sql string, values ...interface{}) error

func DbInstance

func DbInstance(fn GetDbFn, handler DbHandler) error

func DbQuery

func DbQuery(fn GetDbFn, dest interface{}, sql string, values ...interface{}) error

func MysqlConnection

func MysqlConnection(dbConfig cgModel.DbConfig) (*gorm.DB, error)

Types

type DbHandler

type DbHandler func(db *gorm.DB) error

type GetDbFn

type GetDbFn func() (*gorm.DB, error)

type ProcedureResult

type ProcedureResult struct {
	Result  int    `gorm:"type:int(11);"`
	Message string `gorm:"type:varchar(128);"`
	Assist  string `gorm:"type:varchar(1024);"`
}

Jump to

Keyboard shortcuts

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