Documentation ¶
Index ¶
- Variables
- func ClearPagingConfig()
- func FillColumn(schema common.Info, columnIds []string) []common.Info
- func FillCondition(schema common.Info, conditionIdValues common.Info) []common.Info
- func GetCount(db orm.Ormer, schema common.Info, columns []common.Info, ...) int
- func GetListTable(db orm.Ormer, schema common.Info, columns []common.Info, ...) []orm.ParamsList
- func GetSchema(schemaId string) common.Info
- type IPagingColumn
- type IPagingCondition
- type Paging
- func (paging Paging) Count(schemaId string, columnIds []string, condition common.Info) int
- func (paging Paging) Get(schemaId string, columnIds []string, condition common.Info) common.Info
- func (paging Paging) GetDefault(schemaId string, condition common.Info) common.Info
- func (paging Paging) Select(schemaId string, columnIds []string, condition common.Info, start int64, ...) []common.Info
- func (paging Paging) SelectDefault(schemaId string, condition common.Info) []common.Info
- func (paging Paging) SelectList(schemaId string, columnIds []string, condition common.Info, start int64, ...) [][]string
Constants ¶
This section is empty.
Variables ¶
View Source
var PagingColumns map[string]IPagingColumn = map[string]IPagingColumn{}
*
- 存储这个系统中支持的所有列处理类
View Source
var PagingConditions map[string]IPagingCondition = map[string]IPagingCondition{}
*
- 存储这个系统中支持的所有查询条件处理类
Functions ¶
func ClearPagingConfig ¶
func ClearPagingConfig()
func GetCount ¶
func GetCount(db orm.Ormer, schema common.Info, columns []common.Info, conditions []common.Info) int
*
- 返回结果集总记录数量
func GetListTable ¶
func GetListTable(db orm.Ormer, schema common.Info, columns []common.Info, conditions []common.Info, start int64, pageSize int64, orderby []string, isAsc []string) []orm.ParamsList
*
- 根据要显示的列以及用到的查询条件,拼凑并执行SQL,拿到原始数据
- 返回由property指定的列的数据内容,无表头。 *
- 如果传了排序字段和类型,则表明用户想要按自己定义的方式来排序;
- 否则以schema中指定的默认排序方式为准;
- 如果都未指定则不排序。
Types ¶
type Paging ¶
type Paging struct {
// contains filtered or unexported fields
}
*
- 单表增删改
func (Paging) GetDefault ¶
*
- 返回单行数据
- 无需传入指定的columns,该方法返回schema中所有default为true的项
- @param type schemaId
- @param type condition
- @return array字典非数组,如果根据查询条件没有结果则返回null
func (Paging) Select ¶
func (paging Paging) Select(schemaId string, columnIds []string, condition common.Info, start int64, pageSize int64, orderby []string, isAsc []string) []common.Info
*
- 获取多行数据,返回数组,其中每一项是一个字典非数组
- 经过列处理,兼容DB和API两种数据源
func (Paging) SelectDefault ¶
*
- 返回多行数据
- 无需传入指定的columns,该方法返回schema中所有default为true的项
- @param type schemaId
- @param type condition
- @return type array数组非字典,数组中的每一项都是一个字典
Click to show internal directories.
Click to hide internal directories.