Documentation ¶
Index ¶
- type Database
- func (d *Database) Connection(connectionName string) ormcontract.IOrm
- func (d *Database) DB() (*sql.DB, error)
- func (d *Database) Gorm() *gorm.DB
- func (d *Database) Query() ormcontract.DB
- func (d *Database) Transaction(txFunc func(tx ormcontract.Transaction) error) error
- func (d *Database) WithContext(ctx context.Context) ormcontract.IOrm
- type DatabaseManager
- type ServiceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) Connection ¶
func (d *Database) Connection(connectionName string) ormcontract.IOrm
func (*Database) Query ¶
func (d *Database) Query() ormcontract.DB
func (*Database) Transaction ¶
func (d *Database) Transaction(txFunc func(tx ormcontract.Transaction) error) error
func (*Database) WithContext ¶
func (d *Database) WithContext(ctx context.Context) ormcontract.IOrm
type DatabaseManager ¶
type DatabaseManager struct { manager.Manager[ormcontract.IOrm] }
func NewDatabaseManager ¶
func NewDatabaseManager() *DatabaseManager
func (*DatabaseManager) Connection ¶
func (m *DatabaseManager) Connection(name string) ormcontract.IOrm
func (*DatabaseManager) DefaultDatabaseName ¶
func (m *DatabaseManager) DefaultDatabaseName() string
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot()
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register()
Click to show internal directories.
Click to hide internal directories.