Documentation ¶
Index ¶
- func BuildFieldSelect(s *sql.Selector, fields []string)
- func BuildFieldSelector(fields []string) (error, func(s *sql.Selector))
- func BuildFilterSelector(andFilterJsonString, orFilterJsonString string) (error, []func(s *sql.Selector))
- func BuildOrderSelect(s *sql.Selector, field string, desc bool)
- func BuildOrderSelector(orderBys []string, defaultOrderField string) (error, func(s *sql.Selector))
- func BuildPaginationSelect(s *sql.Selector, page, pageSize int32)
- func BuildPaginationSelector(page, pageSize int32, noPaging bool) func(*sql.Selector)
- func BuildQuerySelector(andFilterJsonString, orFilterJsonString string, page, pageSize int32, ...) (err error, whereSelectors []func(s *sql.Selector), ...)
- func QueryCommandToOrderConditions(orderBys []string) (error, func(s *sql.Selector))
- func QueryCommandToWhereConditions(strJson string, isOr bool) (error, func(s *sql.Selector))
- type DatePart
- type FilterOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFieldSelect ¶
func BuildFilterSelector ¶
func BuildOrderSelector ¶
func BuildPaginationSelect ¶
func BuildPaginationSelector ¶
func BuildQuerySelector ¶
func BuildQuerySelector( andFilterJsonString, orFilterJsonString string, page, pageSize int32, noPaging bool, orderBys []string, defaultOrderField string, selectFields []string, ) (err error, whereSelectors []func(s *sql.Selector), querySelectors []func(s *sql.Selector))
BuildQuerySelector Build a paginated filter query
func QueryCommandToOrderConditions ¶
QueryCommandToOrderConditions Query commands converted into sorting conditions
Types ¶
type DatePart ¶
type DatePart int
const ( FilterNot DatePart = iota // Not equal to FilterIn // Check if value is in list FilterNotIn // Not in list FilterGTE // Greater than or equal to the passed value FilterGT // Greater than passed value FilterLTE // Less than or equal to the passed value FilterLT // Less than passed value FilterRange // Whether it is between the two given values FilterIsNull // Is it empty FilterNotIsNull // Whether it is not empty FilterContains // Whether to contain the specified substring FilterInsensitiveContains // Case-insensitive, whether to contain the specified substring FilterStartsWith // Start with value FilterInsensitiveStartsWith // Case-insensitive, starts with value FilterEndsWith // End with value FilterInsensitiveEndsWith // Case-insensitive, ends with value FilterExact // Exact match FilterInsensitiveExact // Case-insensitive, exact match FilterRegex // Regular expression FilterInsensitiveRegex // Case-insensitive, regular expression FilterSearch // Research all )
const ( DatePartDate DatePart = iota // Date DatePartYear // Year DatePartISOYear // ISO 8601 Number of weeks in year DatePartQuarter // Quarter DatePartMonth // Month DatePartWeek // ISO 8601 Week number - The number of weeks in the year DatePartWeekDay // Day of the week DatePartISOWeekDay // Day of the week DatePartDay // Day DatePartTime // Hours: Minutes: Seconds DatePartHour // Hour DatePartMinute // Minutes DatePartSecond // Seconds DatePartMicrosecond // Microseconds )
Click to show internal directories.
Click to hide internal directories.