Versions in this module Expand all Collapse all v0 v0.0.1 Apr 24, 2024 Changes in this version + var FlagKey = "TenantFlag" + var ModeColumn = "column" + var ModeDB = "db" + var ModeNone = "none" + func GetColumnName() string + func GetTenant(ctx context.Context) string + func Init(ctx context.Context) gdb.DB + func SetFlag(ctx context.Context) context.Context + func SetHandle(i Handle) + func SetTenant(ctx context.Context, id string) context.Context + type Config struct + ColumnName string + Mode string + type Handle func(tenantId string) (Model, error) + type Model struct + DbAccount string + DbAddr string + DbName string + DbPass string + DbPort string + type MysqlDriver struct + func (d *MysqlDriver) DoFilter(ctx context.Context, link gdb.Link, sql string, args []interface{}) (newSql string, newArgs []interface{}, err error) + func (d *MysqlDriver) New(core *gdb.Core, node *gdb.ConfigNode) (gdb.DB, error)