Versions in this module Expand all Collapse all v8 v8.0.0 Dec 4, 2023 Changes in this version + func Transaction(ctx context.Context, handlers ...TransactionHandler) error + func TransactionWithSession(ctx context.Context, sess *xorm.Session, handlers ...TransactionHandler) (err error) + type Configuration struct + Databases map[string]*Database + var Config *Configuration + func (o *Configuration) GetDatabase(key string) *Database + func (o *Configuration) GetDefault() *Database + func (o *Configuration) SetDatabase(key string, database *Database) + type Connection struct + var Connector *Connection + func (o *Connection) GetEngineGroup(keys ...string) (engine *xorm.EngineGroup) + func (o *Connection) GetMaster(keys ...string) *xorm.Session + func (o *Connection) GetMasterWithContext(ctx context.Context, keys ...string) *xorm.Session + func (o *Connection) GetSlave(keys ...string) *xorm.Session + func (o *Connection) GetSlaveWithContext(ctx context.Context, keys ...string) *xorm.Session + type Database struct + Driver string + Dsn []string + EnableSession *bool + Mapper string + MaxIdle int + MaxLifetime int + MaxOpen int + ShowSQL *bool + func (o *Database) GetDataName() string + func (o *Database) GetMapper() names.Mapper + func (o *Database) GetUsername() string + func (o *Database) Undefined() bool + type Service struct + func (o *Service) Master() *xorm.Session + func (o *Service) Slave() *xorm.Session + func (o *Service) Use(sessions ...*xorm.Session) + func (o *Service) UseConnection(connection string) + type TransactionHandler func(ctx context.Context, sess *xorm.Session) error