Documentation
¶
Index ¶
- Variables
- func RegisterSQLizer(o *query.Operator, sqlizer SQLizer, raw ...string)
- func SQLOperator(o *query.Operator) (string, error)
- func SplitFilterStrings(s string) []string
- type SQLQueries
- func BasicSQLizer(s *query.Scope, quotedWriter internal.QuotedWordWriteFunc, ...) (SQLQueries, error)
- func InSQLizer(s *query.Scope, quotedWriter internal.QuotedWordWriteFunc, ...) (SQLQueries, error)
- func NullSQLizer(s *query.Scope, quotedWriter internal.QuotedWordWriteFunc, ...) (SQLQueries, error)
- func ParseFilters(s *query.Scope, writer internal.QuotedWordWriteFunc) (SQLQueries, error)
- func StringOperatorsSQLizer(s *query.Scope, quotedWriter internal.QuotedWordWriteFunc, ...) (SQLQueries, error)
- type SQLQuery
- type SQLizer
Constants ¶
This section is empty.
Variables ¶
var ( // ClassInternal defines internal filters error. ClassInternal errors.Class )
Functions ¶
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.
Types ¶
type SQLQueries ¶
type SQLQueries []*SQLQuery
SQLQueries is the wrapper arount the SQL queries value.
func BasicSQLizer ¶
func BasicSQLizer(s *query.Scope, quotedWriter internal.QuotedWordWriteFunc, field *mapping.StructField, fv *query.OperatorValues) (SQLQueries, error)
BasicSQLizer gets the SQLQueries from the provided filter.
func InSQLizer ¶
func InSQLizer(s *query.Scope, quotedWriter internal.QuotedWordWriteFunc, 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, quotedWriter internal.QuotedWordWriteFunc, 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, writer internal.QuotedWordWriteFunc) (SQLQueries, error)
ParseFilters parses the filters into SQLQueries for the provided scope.
func StringOperatorsSQLizer ¶
func StringOperatorsSQLizer(s *query.Scope, quotedWriter internal.QuotedWordWriteFunc, 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 Models pair
type SQLizer ¶
type SQLizer func(*query.Scope, internal.QuotedWordWriteFunc, *mapping.StructField, *query.OperatorValues) (SQLQueries, error)
SQLizer is the function that sqlizes provided OperatorValuePair.