Documentation ¶
Index ¶
- Variables
- func Begin() (*mysql.Tx, error)
- func ClearCache(tablename string, id interface{})
- func ClearCacheByIDs(tableName string, ids ...interface{})
- func ClearListCache(tablename string)
- func ClearOneCache(tablename string, id interface{})
- func Count(table string, q *qs.QuerySet) (num int)
- func CountCache(tablename string, q *qs.QuerySet) int
- func Countsql(sql string, q *qs.QuerySet) (num int)
- func CountsqlC(sql string, params ...interface{}) (num int)
- func Exec(sql string, params ...interface{}) (sql.Result, error)
- func Find(q *qs.QuerySet, obj interface{}) (err error)
- func FindByID(id interface{}, obj interface{}) (err error)
- func FindByIDCache(id interface{}, obj interface{}) (err error)
- func FindByKey(key string, value interface{}, obj interface{}) (err error)
- func FindCustom(sql string, q *qs.QuerySet, obj interface{}) (err error)
- func Finds(q *qs.QuerySet, obj interface{}) (err error)
- func FindsByTableName(q *qs.QuerySet, obj interface{}, tableName string) (err error)
- func FindsCache(q *qs.QuerySet, obj interface{}) (err error)
- func FindsCacheByTableName(q *qs.QuerySet, obj interface{}, tableName string) (err error)
- func FindsCacheCustom(sql string, q *qs.QuerySet, obj interface{}) (err error)
- func GetCacheKey(table, suffix string, id interface{}) string
- func GetTableName(t reflect.Type) string
- func Init()
- func Insert(res interface{}) (int64, error)
- func InsertOrUpdate(res interface{}) (int64, error)
- func Query(sql string, params ...interface{}) (*sql.Rows, error)
- func QueryByQs(sql string, q *qs.QuerySet, data interface{}) error
- func StatusChange(table string, id, version interface{}, key, status string) error
- func StatusChangeShop(table string, id, version, shopid interface{}, key, status string) error
- func Sum(table, key string, q *qs.QuerySet) (sumnum float64)
- func SumSql(sql string, q *qs.QuerySet) (sumnum float64)
- func SumSqlC(sql string, params ...interface{}) (sumnum float64)
- func Update(res interface{}) (int64, error)
- type Time
Constants ¶
This section is empty.
Variables ¶
View Source
var Db *mysql.DB
View Source
var RC *cache.RC
Functions ¶
func ClearCache ¶
func ClearCache(tablename string, id interface{})
func ClearCacheByIDs ¶
func ClearCacheByIDs(tableName string, ids ...interface{})
func ClearListCache ¶
func ClearListCache(tablename string)
func ClearOneCache ¶
func ClearOneCache(tablename string, id interface{})
func FindByIDCache ¶
func FindByIDCache(id interface{}, obj interface{}) (err error)
func FindsByTableName ¶
func FindsCache ¶
func FindsCacheByTableName ¶
func FindsCacheCustom ¶
func GetCacheKey ¶
func GetTableName ¶
func InsertOrUpdate ¶
func StatusChange ¶
func StatusChangeShop ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.