Documentation ¶
Overview ¶
功能性方法文件
Index ¶
- Constants
- Variables
- func AskSwapSort(s string) string
- func HttpPostByte(url string, param []byte, head map[string]string) ([]byte, error)
- func Quick(arr []int)
- func ValToFloat(v interface{}) float64
- func ValToInt(v interface{}) (int, error)
- type DbConfig
- type LogLevel
- type Logger
- type MySql
- type PSql
- type SqlDiff
- type SqlModify
- func (sm *SqlModify) And(c string, diff SqlDiff, val ...interface{}) *SqlModify
- func (sm *SqlModify) MysqlLimit() string
- func (sm *SqlModify) MysqlQuery() (list []map[string]interface{}, total int, err error)
- func (sm *SqlModify) MysqlQueryBuild() (string, []interface{})
- func (sm *SqlModify) Or(c string, diff SqlDiff, val ...interface{}) *SqlModify
- func (sm *SqlModify) PgQueryList(db *sql.DB, sql string, val ...interface{}) (list []map[string]interface{}, total int, err error)
- func (sm *SqlModify) PsqlLimit() string
- func (sm *SqlModify) PsqlQueryBuild() (string, []interface{})
- func (sm *SqlModify) SetPage(p int) *SqlModify
- func (sm *SqlModify) SetSize(s int) *SqlModify
- func (sm *SqlModify) SetSwapObj(f SwapObj) *SqlModify
- func (sm *SqlModify) SetTable(table string) *SqlModify
- type SwapObj
Constants ¶
View Source
const (
EnPage = "SQL_CALC_FOUND_ROWS" //开启分页
)
Variables ¶
Functions ¶
func HttpPostByte ¶
Types ¶
type DbConfig ¶
type DbConfig struct { Host string Port int User string Pwd string DbName string MaxOpenConn int MaxIdleConn int ConnMaxLifetime int }
数据库连接配置
type SqlModify ¶
type SqlModify struct { //数据库查询出来的数据转对象 F SwapObj // contains filtered or unexported fields }
sql编辑对象
func (*SqlModify) MysqlLimit ¶
func (*SqlModify) MysqlQuery ¶
mysql查询
func (*SqlModify) MysqlQueryBuild ¶ added in v1.6.1
func (*SqlModify) PgQueryList ¶ added in v1.5.2
func (*SqlModify) PsqlQueryBuild ¶ added in v1.6.1
func (*SqlModify) SetSwapObj ¶ added in v1.6.8
Click to show internal directories.
Click to hide internal directories.