Documentation ¶
Index ¶
- type DBO
- func (dbo *DBO) Delete(tx *sql.Tx, table string, where []Where) (sql.Result, error)
- func (dbo *DBO) Excute(stmt *sql.Stmt, fields []Feild) (sql.Result, error)
- func (dbo *DBO) Exec(tx *sql.Tx, query string, args ...any) (sql.Result, error)
- func (dbo *DBO) Insert(tx *sql.Tx, table string, fields []Feild) (sql.Result, error)
- func (dbo *DBO) Prepare(tx *sql.Tx, table string, fields []Feild) (*sql.Stmt, error)
- func (dbo *DBO) SelectRawSQL(table string, sqlStr string, values []interface{}, result interface{}) error
- func (dbo *DBO) SelectRows(table string, cols []string, where []Where, order *Order, paging *Paging, ...) error
- func (dbo *DBO) SelectRowsOffset(table string, cols []string, where []Where, order *Order, offset, limit uint64, ...) error
- func (dbo *DBO) SelectRowsToMaps(table string, cols []string, where []Where, order *Order, paging *Paging) ([]map[string]interface{}, error)
- func (dbo *DBO) SelectRowsUnion(table string, cols []string, wheres [][]Where, order *Order, paging *Paging, ...) error
- func (dbo *DBO) SelectRowsUnionToMaps(table string, cols []string, wheres [][]Where, order *Order, paging *Paging) ([]map[string]interface{}, error)
- func (dbo *DBO) Transaction(fn func(tx *sql.Tx) error) error
- func (dbo *DBO) Update(tx *sql.Tx, table string, toupdate []Feild, where []Where) (sql.Result, error)
- type Feild
- type Order
- type Paging
- type Where
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBO ¶
type DBO struct {
// contains filtered or unexported fields
}
func (*DBO) SelectRawSQL ¶
func (dbo *DBO) SelectRawSQL(table string, sqlStr string, values []interface{}, result interface{}) error
SelectRawSQL query useing raw sql
func (*DBO) SelectRows ¶
func (dbo *DBO) SelectRows(table string, cols []string, where []Where, order *Order, paging *Paging, result interface{}) error
SelectRows select rows to struct slice
func (*DBO) SelectRowsOffset ¶
func (dbo *DBO) SelectRowsOffset(table string, cols []string, where []Where, order *Order, offset, limit uint64, result interface{}) error
SelectRowsOffset select rows to struct slice
func (*DBO) SelectRowsToMaps ¶
func (dbo *DBO) SelectRowsToMaps(table string, cols []string, where []Where, order *Order, paging *Paging) ([]map[string]interface{}, error)
SelectRowsToMaps select rows to map slice
func (*DBO) SelectRowsUnion ¶
func (*DBO) SelectRowsUnionToMaps ¶ added in v0.1.8
Click to show internal directories.
Click to hide internal directories.