Documentation
¶
Index ¶
- Constants
- 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 ¶
View Source
const ( FilterNot = "not" // Not equal to FilterIn = "in" // Check if value is in list FilterNotIn = "not_in" // Not in list FilterGTE = "gte" // Greater than or equal to the passed value FilterGT = "gt" // Greater than passed value FilterLTE = "lte" // Less than or equal to the passed value FilterLT = "lt" // Less than passed value FilterRange = "range" // Whether it is between the two given values FilterIsNull = "isnull" // Is it empty FilterNotIsNull = "not_isnull" // Whether it is not empty FilterContains = "contains" // Whether to contain the specified substring FilterInsensitiveContains = "icontains" // Case-insensitive, whether to contain the specified substring FilterStartsWith = "startswith" // Start with value FilterInsensitiveStartsWith = "istartswith" // Case-insensitive, starts with value FilterEndsWith = "endswith" // End with value FilterInsensitiveEndsWith = "iendswith" // Case-insensitive, ends with value FilterExact = "exact" // Exact match FilterInsensitiveExact = "iexact" // Case-insensitive, exact match FilterRegex = "regex" // Regular expression FilterInsensitiveRegex = "iregex" // Case-insensitive, regular expression FilterSearch = "search" // Research all )
Variables ¶
This section is empty.
Functions ¶
func BuildFieldSelect ¶
func BuildFilterSelector ¶
func BuildOrderSelect ¶
BuildOrderSelect .
func BuildOrderSelector ¶
BuildOrderSelector .
func BuildPaginationSelect ¶
BuildPaginationSelect .
func BuildPaginationSelector ¶
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 builds a paging filter query
func QueryCommandToOrderConditions ¶
QueryCommandToOrderConditions query commands converted into sorting conditions
Types ¶
type DatePart ¶
type DatePart int
const ( DatePartDate DatePart = iota // Date DatePartYear // Year DatePartISOYear // ISO 8601 - Number of weeks in year DatePartQuarter // Quarter DatePartMonth // Month DatePartWeek // ISO 8601 - week number, number of week in year DatePartWeekDay // Day of the week DatePartISOWeekDay // Day of the week (ISO) DatePartDay // Day DatePartTime // Hours: Minutes: Seconds DatePartHour // Hour DatePartMinute // Minute DatePartSecond // Second DatePartMicrosecond // Microseconds )
Click to show internal directories.
Click to hide internal directories.