Documentation
¶
Index ¶
- func Incrementor(s *query.Scope) int
- func RegisterSQLizer(o *query.Operator, sqlizer SQLizer, raw ...string)
- func SQLOperator(o *query.Operator) (string, error)
- func SplitFilterStrings(s string) []string
- func StringIncrementor(s *query.Scope) string
- type SQLQueries
- func BasicSQLizer(s *query.Scope, field *mapping.StructField, fv *query.OperatorValues) (SQLQueries, error)
- func InSQLizer(s *query.Scope, field *mapping.StructField, fv *query.OperatorValues) (SQLQueries, error)
- func NullSQLizer(s *query.Scope, field *mapping.StructField, fv *query.OperatorValues) (SQLQueries, error)
- func ParseFilters(s *query.Scope) (SQLQueries, error)
- func StringOperatorsSQLizer(s *query.Scope, field *mapping.StructField, fv *query.OperatorValues) (SQLQueries, error)
- type SQLQuery
- type SQLizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Incrementor ¶ added in v0.4.0
Incrementor is the function that returns next query increment value. Used to obtain the queries values with the incremented arguments.
func RegisterSQLizer ¶
RegisterSQLizer registers new SQLizer function for the provided operator. Optionally can set the raw SQL value.
func SQLOperator ¶
SQLOperator gets the operator sql name.
func SplitFilterStrings ¶
SplitFilterStrings splits the filter string value into array of strings.
func StringIncrementor ¶ added in v0.4.0
StringIncrementor is the function that returns next query increment value in a string form. Used to obtain the queries values with the incremented arguments.
Types ¶
type SQLQueries ¶
type SQLQueries []*SQLQuery
SQLQueries is the wrapper arount the SQL queries value.
func BasicSQLizer ¶
func BasicSQLizer(s *query.Scope, field *mapping.StructField, fv *query.OperatorValues) (SQLQueries, error)
BasicSQLizer gets the SQLQueries from the provided filter.
func InSQLizer ¶
func InSQLizer(s *query.Scope, field *mapping.StructField, fv *query.OperatorValues) (SQLQueries, error)
InSQLizer creates the SQLQueries for the 'IN' and 'NOT IN' filter Operators.
func NullSQLizer ¶
func NullSQLizer(s *query.Scope, field *mapping.StructField, fv *query.OperatorValues) (SQLQueries, error)
NullSQLizer is the SQLizer function that returns NULL'ed queries.
func ParseFilters ¶
func ParseFilters(s *query.Scope) (SQLQueries, error)
ParseFilters parses the filters into SQLQueries for the provided scope.
func StringOperatorsSQLizer ¶
func StringOperatorsSQLizer(s *query.Scope, field *mapping.StructField, fv *query.OperatorValues) (SQLQueries, error)
StringOperatorsSQLizer creates the SQLQueries for the provided filter values.
type SQLQuery ¶
type SQLQuery struct {
Query string
Values []interface{}
}
SQLQuery defines the SQL Query Values pair
type SQLizer ¶
type SQLizer func(*query.Scope, *mapping.StructField, *query.OperatorValues) (SQLQueries, error)
SQLizer is the function that sqlizes provided OperatorValuePair.