datasource

package
v2.0.0-...-8f2ac71 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddClientDB

func AddClientDB(message []byte)

func BeginClientTx

func BeginClientTx() (tx *gorm.DB)

BeginClientTx begin a transaction by default client ID

func BeginClientTxByID

func BeginClientTxByID(clientID string) (tx *gorm.DB)

BeginClientTxByID must commit it manually

func BeginClientTxByIDWithAutoCommit

func BeginClientTxByIDWithAutoCommit(clientID string) (tx *gorm.DB)

func BeginCommonTx

func BeginCommonTx() (tx *gorm.DB)

BeginCommonTx begin a transaction

func DisposeClientTx

func DisposeClientTx(err interface{})

DisposeClientTx commit the transaction if err is nil otherwise rollback

func DisposeCommonTx

func DisposeCommonTx(err interface{})

DisposeCommonTx commit the transaction if err is nil otherwise rollback

func GetClientDB

func GetClientDB() (db *gorm.DB)

GetClientDB returns by default client DB

func GetClientDBs

func GetClientDBs() (dbs map[string]*gorm.DB)

GetClientDBs return all Client DB list

func GetClientDbById

func GetClientDbById(clientId string) (db *gorm.DB)

GetClientDbById returns client DB by Client_ID

func GetCommonDB

func GetCommonDB() (db *gorm.DB)

func HealthCheck

func HealthCheck() error

func Init

func Init(app *iris.Application)

Init dbMap

func InitCommonDB

func InitCommonDB()

func InitCustomizedDB

func InitCustomizedDB()

func InitTenantDB

func InitTenantDB()

Types

type GormLogger

type GormLogger struct{}

func NewGormLogger

func NewGormLogger() *GormLogger

func (*GormLogger) Printf

func (*GormLogger) Printf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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