Documentation
¶
Index ¶
- func GetConfigs(name string) map[string]*Config
- func SetConfig(name string, c map[string]any) error
- func SetIniConfig(name string, section *ini.Section) error
- type Config
- type Driver
- type Executor
- func (e *Executor) Delete(table string, where map[string]any) (sql.Result, error)
- func (e *Executor) Exec(sq string, args ...any) (sql.Result, error)
- func (e *Executor) GetBind(bind *any, sq string, args ...any) error
- func (e *Executor) GetMap(sq string, args ...any) (map[string]string, error)
- func (e *Executor) GetMaps(sq string, args ...any) ([]map[string]string, error)
- func (e *Executor) GetTable(table string) *Table
- func (e *Executor) GetTuple(table string) *Tuple
- func (e *Executor) GetValue(sq string, args ...any) (string, error)
- func (e *Executor) GetValues(sq string, args ...any) ([]string, error)
- func (e *Executor) Insert(table string, data map[string]any) (sql.Result, error)
- func (e *Executor) Query(sq string, args ...any) (*sql.Rows, error)
- func (e *Executor) Truncate(table string) (sql.Result, error)
- func (e *Executor) Update(table string, data map[string]any, primaryKeys ...string) (sql.Result, error)
- type ExecutorType
- type Table
- func (table *Table) Count(fields string) int
- func (table *Table) GetValue(fields string) string
- func (table *Table) Init() *Table
- func (table *Table) Limit(limit int) *Table
- func (table *Table) Offset(offset int) *Table
- func (table *Table) OrderBy(field string, dir string) *Table
- func (table *Table) OrderByStr(orderBy string) *Table
- func (table *Table) SetExecutor(e *Executor) *Table
- func (table *Table) SetName(name string) *Table
- func (table *Table) SetStruct(s any) *Table
- func (table *Table) Where(params ...any) *Table
- func (table *Table) WhereGroup(params []any) *Table
- type Tuple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶ added in v0.0.10
type Driver struct { *Executor // contains filtered or unexported fields }
type Executor ¶ added in v0.0.10
type Executor struct {
// contains filtered or unexported fields
}
type ExecutorType ¶ added in v0.0.10
type ExecutorType string
const ( ExecutorTypeDb ExecutorType = "db" ExecutorTypeTx ExecutorType = "tx" )
type Table ¶ added in v0.0.9
type Table struct {
// contains filtered or unexported fields
}
func (*Table) OrderByStr ¶ added in v0.0.10
OrderByStr 排序字符串
func (*Table) SetExecutor ¶ added in v0.0.10
SetExecutor 设置执行品
func (*Table) WhereGroup ¶ added in v0.0.10
WhereGroup 一组查询条件
type Tuple ¶ added in v0.0.9
type Tuple struct {
// contains filtered or unexported fields
}
func (*Tuple) SetExecutor ¶ added in v0.0.10
SetExecutor 设置执行品
Click to show internal directories.
Click to hide internal directories.