Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomOperatorHandler ¶ added in v1.0.1
CustomOperatorHandler is an interface for custom operator implementations. This mirrors the public OperatorHandler interface.
type CustomOperatorLookup ¶ added in v1.0.1
type CustomOperatorLookup func(operatorName string) (CustomOperatorHandler, bool)
CustomOperatorLookup is a function type for looking up custom operators.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser parses JSON Logic expressions and converts them to SQL WHERE clauses.
func NewParser ¶
func NewParser(config *operators.OperatorConfig) *Parser
NewParser creates a new parser instance with config. Config must not be nil and must have a valid dialect set.
func (*Parser) SetCustomOperatorLookup ¶ added in v1.0.1
func (p *Parser) SetCustomOperatorLookup(lookup CustomOperatorLookup)
SetCustomOperatorLookup sets the function used to look up custom operators. This also sets up the validator to recognize custom operators.
func (*Parser) SetSchema ¶ added in v1.0.1
func (p *Parser) SetSchema(schema operators.SchemaProvider)
SetSchema sets the schema provider for field validation and type checking.
Click to show internal directories.
Click to hide internal directories.