Documentation ¶
Index ¶
- func Mongo() func(parser *Parser) error
- func Mysql() func(parser *Parser) error
- func MysqlPre(nameTransfer func(s string) string) func(parser *PreParser) error
- func SetAllowedKeys(keys []string) func(opts *ProcessOptions) error
- func SetForbiddenKeys(keys []string) func(opts *ProcessOptions) error
- func WithKeyTransformers(transformers ...func(string) string) func(parser *Parser) error
- func WithOperators(operators ...Operator) func(parser *Parser) error
- type Operator
- type Parser
- type PreOperator
- type PreParser
- type ProcessOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAllowedKeys ¶
func SetAllowedKeys(keys []string) func(opts *ProcessOptions) error
SetAllowedKeys set's the keys which can be used for querying.
func SetForbiddenKeys ¶
func SetForbiddenKeys(keys []string) func(opts *ProcessOptions) error
SetForbiddenKeys set's the keys which must not be used for querying.
func WithKeyTransformers ¶
WithKeyTransformers adds functions to alter key names in any way.
func WithOperators ¶
WithOperator adds custom operators to the parser
Types ¶
type Operator ¶
Operator represents a query Operator. It defines the Operator itself, the mongodb representation of the Operator and if it is a list Operator or not. Operators must match regex reOperator: `(!|=)[^=()]*=`
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser represents a RSQL parser.
type PreOperator ¶
type PreParser ¶
type PreParser struct {
// contains filtered or unexported fields
}
PreParser represents a RSQL parser to generate prepare statement.
func NewPreParser ¶
NewParser returns a new rsql server.
func (*PreParser) ProcessPre ¶
type ProcessOptions ¶
type ProcessOptions struct {
// contains filtered or unexported fields
}
ProcessOptions contains options for the parser's Process function.