Documentation ¶
Index ¶
- func SqlNullString(value string) sql.NullString
- type Cnd
- func (s *Cnd) Asc(column string) *Cnd
- func (s *Cnd) Build(db *gorm.DB) *gorm.DB
- func (s *Cnd) Cols(selectCols ...string) *Cnd
- func (s *Cnd) Count(db *gorm.DB, model interface{}) int64
- func (s *Cnd) Desc(column string) *Cnd
- func (s *Cnd) Ending(column string, str string) *Cnd
- func (s *Cnd) Eq(column string, args ...interface{}) *Cnd
- func (s *Cnd) Find(db *gorm.DB, out interface{})
- func (s *Cnd) FindOne(db *gorm.DB, out interface{}) error
- func (s *Cnd) Gt(column string, args ...interface{}) *Cnd
- func (s *Cnd) Gte(column string, args ...interface{}) *Cnd
- func (s *Cnd) In(column string, params interface{}) *Cnd
- func (s *Cnd) Like(column string, str string) *Cnd
- func (s *Cnd) Limit(limit int) *Cnd
- func (s *Cnd) Lt(column string, args ...interface{}) *Cnd
- func (s *Cnd) Lte(column string, args ...interface{}) *Cnd
- func (s *Cnd) NotEq(column string, args ...interface{}) *Cnd
- func (s *Cnd) NotIn(column string, params interface{}) *Cnd
- func (s *Cnd) Page(page, limit int) *Cnd
- func (s *Cnd) Starting(column string, str string) *Cnd
- func (s *Cnd) Where(query string, args ...interface{}) *Cnd
- type CursorResult
- type OrderByCol
- type PageResult
- type Paging
- type ParamPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SqlNullString ¶
func SqlNullString(value string) sql.NullString
Types ¶
type Cnd ¶
type Cnd struct { SelectCols []string // 要查询的字段,如果为空,表示查询所有字段 Params []ParamPair // 参数 Orders []OrderByCol // 排序 Paging *Paging // 分页 }
type CursorResult ¶
type CursorResult struct { Results interface{} `json:"results"` // 数据 Cursor string `json:"cursor"` // 下一页 HasMore bool `json:"hasMore"` // 是否还有数据 }
CursorResult Cursor分页返回数据
type PageResult ¶
type PageResult struct { Page *Paging `json:"page"` // 分页信息 Results interface{} `json:"results"` // 数据 }
PageResult 分页返回数据
Click to show internal directories.
Click to hide internal directories.