Documentation
¶
Index ¶
- func MysqlConnector(config contracts.Fields, events contracts.EventDispatcher) contracts.DBConnection
- func PostgresSqlConnector(config contracts.Fields, events contracts.EventDispatcher) contracts.DBConnection
- func SqliteConnector(config contracts.Fields, events contracts.EventDispatcher) contracts.DBConnection
- type Base
- func (this *Base) Begin() (contracts.DBTx, error)
- func (this *Base) Exec(query string, args ...interface{}) (result contracts.Result, err error)
- func (this *Base) Get(dest interface{}, query string, args ...interface{}) (err error)
- func (this *Base) Query(query string, args ...interface{}) (results contracts.Collection, err error)
- func (this *Base) Select(dest interface{}, query string, args ...interface{}) (err error)
- func (this *Base) Transaction(fn func(tx contracts.SqlExecutor) error) (err error)
- type Mysql
- type PostgresSQL
- type Sqlite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MysqlConnector ¶
func MysqlConnector(config contracts.Fields, events contracts.EventDispatcher) contracts.DBConnection
func PostgresSqlConnector ¶
func PostgresSqlConnector(config contracts.Fields, events contracts.EventDispatcher) contracts.DBConnection
func SqliteConnector ¶
func SqliteConnector(config contracts.Fields, events contracts.EventDispatcher) contracts.DBConnection
Types ¶
type Base ¶
func (*Base) Query ¶
func (this *Base) Query(query string, args ...interface{}) (results contracts.Collection, err error)
func (*Base) Transaction ¶
func (this *Base) Transaction(fn func(tx contracts.SqlExecutor) error) (err error)
type PostgresSQL ¶
type PostgresSQL struct {
*Base
}
Click to show internal directories.
Click to hide internal directories.