Documentation ¶
Index ¶
- func FormatIniConfig(section *ini.Section) (map[string]any, error)
- func GetConfig(name string) (map[string]any, error)
- func GetConfigs(name string) map[string]map[string]any
- func SetConfig(name string, config map[string]any)
- type Db
- func (db *Db) Delete(table string, where map[string]any) (sql.Result, error)
- func (db *Db) Exec(sql string, args ...any) (sql.Result, error)
- func (db *Db) GetConfig() *DbConfig
- func (db *Db) GetMap(sql string, args ...any) (map[string]string, error)
- func (db *Db) GetMaps(sql string, args ...any) ([]map[string]string, error)
- func (db *Db) GetValue(sql string, args ...any) (string, error)
- func (db *Db) GetValues(sql string, args ...any) ([]string, error)
- func (db *Db) Init() error
- func (db *Db) Insert(table string, data map[string]any) (sql.Result, error)
- func (db *Db) Query(sql string, args ...any) (*sql.Rows, error)
- func (db *Db) SetConfig(config map[string]any)
- func (db *Db) Truncate(table string) (sql.Result, error)
- func (db *Db) Update(table string, data map[string]any, primaryKeys ...string) (sql.Result, error)
- type DbConfig
- type Table
- type Tuple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatIniConfig ¶ added in v0.0.9
FormatIniConfig 格式化 ini 配置
func GetConfigs ¶ added in v0.0.9
GetConfigs 获取配置项
Types ¶
type Db ¶
type Db struct {
// contains filtered or unexported fields
}
func GetDbByConfig ¶ added in v0.0.9
GetDbByConfig 按配置文件创建数据库实例
Click to show internal directories.
Click to hide internal directories.