Documentation ¶
Index ¶
- type MysqlDBConfig
- func (DBConfig *MysqlDBConfig) Alias(str string) *MysqlDBConfig
- func (DBConfig *MysqlDBConfig) Delete(isRows bool) (rows int64, err error)
- func (DBConfig *MysqlDBConfig) Field(str string) *MysqlDBConfig
- func (DBConfig *MysqlDBConfig) Find() (result map[string]string, err error)
- func (DBConfig *MysqlDBConfig) GroupBy(str string, mode string) *MysqlDBConfig
- func (DBConfig *MysqlDBConfig) Insert(data map[string]string, isRows bool) (rows int64, err error)
- func (DBConfig *MysqlDBConfig) IsPrintSql(mode bool) *MysqlDBConfig
- func (DBConfig *MysqlDBConfig) Join(str string, mode string) *MysqlDBConfig
- func (DBConfig *MysqlDBConfig) OrderBy(str string, mode string) *MysqlDBConfig
- func (DBConfig *MysqlDBConfig) Select() (result map[int]map[string]string, err error)
- func (DBConfig *MysqlDBConfig) TableName(str string) *MysqlDBConfig
- func (DBConfig *MysqlDBConfig) Update(data map[string]string, isRows bool) (rows int64, err error)
- func (DBConfig *MysqlDBConfig) Where(str string, mode string) *MysqlDBConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlDBConfig ¶
type MysqlDBConfig struct {
// contains filtered or unexported fields
}
var DBConfig *MysqlDBConfig
func (*MysqlDBConfig) Alias ¶
func (DBConfig *MysqlDBConfig) Alias(str string) *MysqlDBConfig
* 设置数据表
func (*MysqlDBConfig) Delete ¶
func (DBConfig *MysqlDBConfig) Delete(isRows bool) (rows int64, err error)
* 删除数据 isRows true 返回影响的行数 FALSE 返回最后一行的主键ID
func (*MysqlDBConfig) Field ¶
func (DBConfig *MysqlDBConfig) Field(str string) *MysqlDBConfig
* 设置查询字段,支持链式,支持重复调用
func (*MysqlDBConfig) Find ¶
func (DBConfig *MysqlDBConfig) Find() (result map[string]string, err error)
* 指查询一条
func (*MysqlDBConfig) GroupBy ¶
func (DBConfig *MysqlDBConfig) GroupBy(str string, mode string) *MysqlDBConfig
* 设置分组排序,支持链式调用,不支持重复使用
func (*MysqlDBConfig) IsPrintSql ¶
func (DBConfig *MysqlDBConfig) IsPrintSql(mode bool) *MysqlDBConfig
* 是否打印SQL
func (*MysqlDBConfig) Join ¶
func (DBConfig *MysqlDBConfig) Join(str string, mode string) *MysqlDBConfig
* 连表操作,支持链式,支持重复调用
func (*MysqlDBConfig) OrderBy ¶
func (DBConfig *MysqlDBConfig) OrderBy(str string, mode string) *MysqlDBConfig
* 设置排序条件,支持链式,不支持重复调用
func (*MysqlDBConfig) Select ¶
func (DBConfig *MysqlDBConfig) Select() (result map[int]map[string]string, err error)
* 查询数据, 返回结果map
func (*MysqlDBConfig) TableName ¶
func (DBConfig *MysqlDBConfig) TableName(str string) *MysqlDBConfig
* 设置数据表
func (*MysqlDBConfig) Where ¶
func (DBConfig *MysqlDBConfig) Where(str string, mode string) *MysqlDBConfig
* 设置WHERE条件,支持链式重复调用
Click to show internal directories.
Click to hide internal directories.