Documentation ¶
Index ¶
- Variables
- type DB
- func (db *DB) Begin() error
- func (db *DB) CleanDb() *DB
- func (db DB) CleanOrders() DB
- func (db DB) Clone() DB
- func (db *DB) CloneIfDifferentRoutine()
- func (db *DB) Commit()
- func (db DB) Count(columnName string) (int64, error)
- func (db DB) Delete(vs ...interface{}) (int64, int64, error)
- func (db DB) DoTransaction(work TransactionWork) (interface{}, error)
- func (db DB) ExecuteRaw() (int64, int64, error)
- func (db DB) ExecuteStatement(statement string, data ...interface{}) (sql.Result, error)
- func (db DB) First(vs interface{}) (interface{}, error)
- func (db DB) Insert(v interface{}, columns ...string) (int64, int64, error)
- func (db DB) IsInTransaction() bool
- func (db DB) OrderBy(field string, t structs.OrderType) DB
- func (db DB) OrderByAsc(field string) DB
- func (db DB) OrderByDesc(field string) DB
- func (db DB) Page(index int, pageSize int) DB
- func (db DB) Raw(sql string, datas ...interface{}) DB
- func (db DB) RawDb() *sql.DB
- func (db *DB) Rollback()
- func (db DB) Select(vs interface{}, columns ...string) (interface{}, error)
- func (db DB) SelectByModel(model structs.TableModel) (interface{}, error)
- func (db DB) Sum(columnName string) structs.CountResult
- func (db DB) Table(table string) DB
- func (db DB) Update(v interface{}, columns ...string) (int64, int64, error)
- func (db DB) Where(cnd cnds.Condition) DB
- func (db DB) Where2(sql string, patches ...interface{}) DB
- type TransactionWork
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug bool
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func OpenWithConfig ¶
func (DB) CleanOrders ¶
func (*DB) CloneIfDifferentRoutine ¶
func (db *DB) CloneIfDifferentRoutine()
func (DB) DoTransaction ¶
func (db DB) DoTransaction(work TransactionWork) (interface{}, error)
func (DB) ExecuteStatement ¶
func (DB) IsInTransaction ¶
func (DB) OrderByAsc ¶
func (DB) OrderByDesc ¶
func (DB) SelectByModel ¶
func (db DB) SelectByModel(model structs.TableModel) (interface{}, error)
type TransactionWork ¶
Click to show internal directories.
Click to hide internal directories.