Versions in this module Expand all Collapse all v1 v1.0.4 Jun 22, 2020 Changes in this version + func GetNullString(data sql.NullString) (word string) + func NewNullString(word string) sql.NullString v1.0.3 Jun 10, 2020 v1.0.2 May 25, 2020 Changes in this version + const MAX_TIMEOUT + const SESS_ERR_REDIS + const SESS_FOR_EVER + const SESS_LIST_SEP + const SESS_NOT_EXISTS + const SESS_ONLINE_KEY + const SESS_PREFIX + const SESS_TOKEN_KEY + var NESTED_EDGE_OFFSET = 2 + func BlindlyQuote(engine *xorm.Engine, sep string, words ...string) string + func CalcPage(pageno, pagesize, total int) (int, int) + func ClusterInsertMulti(xi xorm.Interface, objs []IResetTable, reset, trunc bool) (total int64, err error) + func CreateTableLike(engine *xorm.Engine, curr, orig string) (bool, error) + func FindTables(engine *xorm.Engine, prefix string, fullName bool) []string + func GetPrimarykey(engine *xorm.Engine, m interface{}) *schemas.Column + func JoinQuery(engine *xorm.Engine, query *xorm.Session, table, fkey string, ...) (*xorm.Session, []string) + func MoveEdge(query *xorm.Session, table string, base, offset int) error + func NegativeOffset(offset, pagesize, total int) int + func Paginate(query *xorm.Session, pageno, pagesize int) *xorm.Session + func Qprintf(engine *xorm.Engine, format string, args ...interface{}) string + func RebuildNestedByDepth(query *xorm.Session, table string) error + func SessListJoin(data []string) string + func SessListSplit(data string) []string + type ClusterMixin struct + Date time.Time + Format string + Kind string + Suffixes sort.StringSlice + TableNamePrefix string + func GetClusterMixinFor(kind, prefix string, engine *xorm.Engine) *ClusterMixin + func NewClusterDaily(t time.Time) *ClusterMixin + func NewClusterHourly(t time.Time) *ClusterMixin + func NewClusterMixin(kind string, t time.Time) *ClusterMixin + func NewClusterMonthly(t time.Time) *ClusterMixin + func NewClusterQuarterly(t time.Time) *ClusterMixin + func NewClusterWeekly(t time.Time) *ClusterMixin + func (m *ClusterMixin) Move(n int) *ClusterMixin + func (m *ClusterMixin) Next() bool + func (m *ClusterMixin) Prev() bool + func (m *ClusterMixin) SetTime(t time.Time, toFirst bool) *ClusterMixin + func (m ClusterMixin) GetSuffix() string + type ClusterQuery struct + func NewClusterQuery(engine *xorm.Engine, cluster *ClusterMixin) *ClusterQuery + func (q *ClusterQuery) AddFilter(filter FilterFunc) *ClusterQuery + func (q *ClusterQuery) ClearFilters() *ClusterQuery + func (q *ClusterQuery) ClusterCount(bean ...interface{}) (int64, error) + func (q *ClusterQuery) ClusterPaginate(pageno, pagesize int, rowsSlicePtr interface{}, condiBean ...interface{}) (int64, error) + func (q *ClusterQuery) Count(bean ...interface{}) (int64, error) + func (q *ClusterQuery) FindAndCount(rowsSlicePtr interface{}, condiBean ...interface{}) (int64, error) + func (q *ClusterQuery) GetQuery() *xorm.Session + func (q *ClusterQuery) GetTable() string + func (q *ClusterQuery) Limit(limit int, start ...int) *ClusterQuery + func (q *ClusterQuery) OrderBy(order string) *ClusterQuery + func (q ClusterQuery) Quote(value string) string + type FilterFunc = func(query *xorm.Session) *xorm.Session + type ForeignTable struct + Alias string + Index string + Join join.JoinOp + Table ITableName + func (f ForeignTable) AliasName() string + func (f ForeignTable) TableName() string + type IResetTable interface + ResetTable func(curr string, trunc bool) error + type ITableComment interface + TableComment func() string + type ITableName interface + TableName func() string + type LeftJoinQuery struct + ForeignKeys []string + Foreigns map[string]ForeignTable + Native ITableName + func NewLeftJoinQuery(engine *xorm.Engine, native ITableName) *LeftJoinQuery + func (q *LeftJoinQuery) AddFilter(filter FilterFunc) *LeftJoinQuery + func (q *LeftJoinQuery) AddLeftJoin(foreign ITableName, pkey, fkey, alias string) *LeftJoinQuery + func (q *LeftJoinQuery) ClearFilters() *LeftJoinQuery + func (q *LeftJoinQuery) Count(bean ...interface{}) (int64, error) + func (q *LeftJoinQuery) FindAndCount(rowsSlicePtr interface{}, condiBean ...interface{}) (int64, error) + func (q *LeftJoinQuery) FindPaginate(pageno, pagesize int, rowsSlicePtr interface{}, condiBean ...interface{}) (int64, error) + func (q *LeftJoinQuery) GetQuery() *xorm.Session + func (q *LeftJoinQuery) LeftJoin(foreign ITableName, fkey string) *LeftJoinQuery + func (q *LeftJoinQuery) Limit(limit int, start ...int) *LeftJoinQuery + func (q *LeftJoinQuery) OrderBy(order string) *LeftJoinQuery + func (q LeftJoinQuery) Quote(value string) string + type ModifyFunc = func(tx *xorm.Session) (int64, error) + type NestedMixin struct + Depth int + Lft int + Rgt int + func (n *NestedMixin) AddToParent(parent *NestedMixin, query *xorm.Session, table string) (err error) + func (n NestedMixin) AncestorsFilter(backward bool) FilterFunc + func (n NestedMixin) ChildrenFilter(rank int, depthFirst bool) FilterFunc + func (n NestedMixin) CountChildren() int + func (n NestedMixin) GetDepth() int + func (n NestedMixin) IsLeaf() bool + type NestedRow struct + Id int + ParentIdNihility996 int + type Session struct + func NewSession(reg *SessionRegistry, key string, timeout int) *Session + func (sess *Session) AddFlash(messages ...string) (int, error) + func (sess *Session) BindRoles(uid string, roles []string, kick bool) (string, error) + func (sess *Session) GetFlashes(n int) ([]string, error) + func (sess *Session) GetKey() string + func (sess *Session) WrapExec(cmd string, args ...interface{}) (interface{}, error) + type SessionRegistry struct + Onlines *redisw.RedisHash + func NewRegistry(w *redisw.RedisWrapper) *SessionRegistry + func (sr *SessionRegistry) DelSession(token string) bool + func (sr *SessionRegistry) GetSession(token string, timeout int) *Session + func (sr SessionRegistry) GetKey(token string) string + type TimeMixin struct + CreatedAt time.Time + DeletedAt time.Time + UpdatedAt time.Time