Documentation ¶
Index ¶
- type Database
- func (db *Database) Close() error
- func (db *Database) Exec(sql string, data ...interface{}) error
- func (db *Database) GetDatabase() *sql.DB
- func (db *Database) GetLastInsertId() uint64
- func (db *Database) GetName() string
- func (db *Database) GetOne(sql string, data ...interface{}) ([]byte, error)
- func (db *Database) GetRecord(sqlString string, data ...interface{}) (map[string]interface{}, error)
- func (db *Database) GetRecords(sqlString string, data ...interface{}) ([]map[string]interface{}, error)
- func (db *Database) GetResult() (sql.Result, error)
- func (db *Database) GetStmt(sql string) (*sql.Stmt, error)
- func (db *Database) Insert(tableName string, data map[string]interface{}) error
- func (db *Database) IsConnected() bool
- func (db *Database) IsMySQL() bool
- func (db *Database) IsPostgres() bool
- func (db *Database) IsSQLite() bool
- func (db *Database) Update(tableName string, data map[string]interface{}) error
- type IDatabase
- type Pool
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) GetDatabase ¶
func (*Database) GetLastInsertId ¶
func (*Database) GetRecords ¶
func (*Database) IsConnected ¶
func (*Database) IsPostgres ¶
type IDatabase ¶
type IDatabase interface { Exec(sql string, data ...interface{}) error GetOne(sql string, data ...interface{}) ([]byte, error) GetRecord(sql string, data ...interface{}) (map[string]interface{}, error) GetRecords(sql string, data ...interface{}) ([]map[string]interface{}, error) Insert(tableName string, data map[string]interface{}) error Update(tableName string, data map[string]interface{}) error IsConnected() bool IsSQLite() bool IsMySQL() bool IsPostgres() bool GetLastInsertId() uint64 GetResult() (sql.Result, error) GetDatabase() *sql.DB GetName() string // contains filtered or unexported methods }
type Pool ¶ added in v0.6.2
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) AddConnection ¶ added in v0.6.2
func (*Pool) GetConnection ¶ added in v0.6.2
func (*Pool) IsConnected ¶ added in v0.6.3
func (*Pool) RemoveConnection ¶ added in v0.6.2
Click to show internal directories.
Click to hide internal directories.