Documentation ¶
Index ¶
- func NewZitiqlParseError(tn *antlr.TerminalNode, msg string) zitiql.ParseError
- func ParseWhereClause(str string, imap *IdentifierMap) (squirrel.Sqlizer, []error)
- type Between
- type ConjType
- type Contains
- type Direction
- type IdentifierMap
- type IdentifierOps
- type IdentifierTranslations
- type InSubSelect
- type NotBetween
- type NotContains
- type OpSet
- type OpType
- type Paging
- type ParseError
- type Predicate
- type ResolverType
- type Sort
- type SortField
- type ToSquirrelListener
- func (z *ToSquirrelListener) EnterAndConjunction(c *zitiql.AndConjunctionContext)
- func (z *ToSquirrelListener) EnterBetweenDateOp(c *zitiql.BetweenDateOpContext)
- func (z *ToSquirrelListener) EnterBetweenNumberOp(c *zitiql.BetweenNumberOpContext)
- func (z *ToSquirrelListener) EnterBinaryContainsOp(c *zitiql.BinaryContainsOpContext)
- func (z *ToSquirrelListener) EnterBinaryEqualToBoolOp(c *zitiql.BinaryEqualToBoolOpContext)
- func (z *ToSquirrelListener) EnterBinaryEqualToDatetimeOp(c *zitiql.BinaryEqualToDatetimeOpContext)
- func (z *ToSquirrelListener) EnterBinaryEqualToNullOp(c *zitiql.BinaryEqualToNullOpContext)
- func (z *ToSquirrelListener) EnterBinaryEqualToNumberOp(c *zitiql.BinaryEqualToNumberOpContext)
- func (z *ToSquirrelListener) EnterBinaryEqualToStringOp(c *zitiql.BinaryEqualToStringOpContext)
- func (z *ToSquirrelListener) EnterBinaryGreaterThanDatetimeOp(c *zitiql.BinaryGreaterThanDatetimeOpContext)
- func (z *ToSquirrelListener) EnterBinaryGreaterThanNumberOp(c *zitiql.BinaryGreaterThanNumberOpContext)
- func (z *ToSquirrelListener) EnterBinaryLessThanDatetimeOp(c *zitiql.BinaryLessThanDatetimeOpContext)
- func (z *ToSquirrelListener) EnterBinaryLessThanNumberOp(c *zitiql.BinaryLessThanNumberOpContext)
- func (z *ToSquirrelListener) EnterEnd(c *zitiql.EndContext)
- func (z *ToSquirrelListener) EnterGroup(c *zitiql.GroupContext)
- func (z *ToSquirrelListener) EnterInDatetimeArrayOp(c *zitiql.InDatetimeArrayOpContext)
- func (z *ToSquirrelListener) EnterInNumberArrayOp(c *zitiql.InNumberArrayOpContext)
- func (z *ToSquirrelListener) EnterInStringArrayOp(c *zitiql.InStringArrayOpContext)
- func (z *ToSquirrelListener) EnterOperationOp(c *zitiql.OperationOpContext)
- func (z *ToSquirrelListener) EnterOrConjunction(c *zitiql.OrConjunctionContext)
- func (z *ToSquirrelListener) ExitAndConjunction(c *zitiql.AndConjunctionContext)
- func (z *ToSquirrelListener) ExitBetweenDateOp(c *zitiql.BetweenDateOpContext)
- func (z *ToSquirrelListener) ExitBetweenNumberOp(c *zitiql.BetweenNumberOpContext)
- func (z *ToSquirrelListener) ExitBinaryContainsOp(c *zitiql.BinaryContainsOpContext)
- func (z *ToSquirrelListener) ExitBinaryEqualToBoolOp(c *zitiql.BinaryEqualToBoolOpContext)
- func (z *ToSquirrelListener) ExitBinaryEqualToDatetimeOp(c *zitiql.BinaryEqualToDatetimeOpContext)
- func (z *ToSquirrelListener) ExitBinaryEqualToNullOp(c *zitiql.BinaryEqualToNullOpContext)
- func (z *ToSquirrelListener) ExitBinaryEqualToNumberOp(c *zitiql.BinaryEqualToNumberOpContext)
- func (z *ToSquirrelListener) ExitBinaryEqualToStringOp(c *zitiql.BinaryEqualToStringOpContext)
- func (z *ToSquirrelListener) ExitBinaryGreaterThanDatetimeOp(c *zitiql.BinaryGreaterThanDatetimeOpContext)
- func (z *ToSquirrelListener) ExitBinaryGreaterThanNumberOp(c *zitiql.BinaryGreaterThanNumberOpContext)
- func (z *ToSquirrelListener) ExitBinaryLessThanDatetimeOp(c *zitiql.BinaryLessThanDatetimeOpContext)
- func (z *ToSquirrelListener) ExitBinaryLessThanNumberOp(c *zitiql.BinaryLessThanNumberOpContext)
- func (z *ToSquirrelListener) ExitEnd(c *zitiql.EndContext)
- func (z *ToSquirrelListener) ExitGroup(c *zitiql.GroupContext)
- func (z *ToSquirrelListener) ExitInDatetimeArrayOp(c *zitiql.InDatetimeArrayOpContext)
- func (z *ToSquirrelListener) ExitInNumberArrayOp(c *zitiql.InNumberArrayOpContext)
- func (z *ToSquirrelListener) ExitInStringArrayOp(c *zitiql.InStringArrayOpContext)
- func (z *ToSquirrelListener) ExitOperationOp(c *zitiql.OperationOpContext)
- func (z *ToSquirrelListener) ExitOrConjunction(c *zitiql.OrConjunctionContext)
- func (z *ToSquirrelListener) HandleError(err error)
- type ValueType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewZitiqlParseError ¶
func NewZitiqlParseError(tn *antlr.TerminalNode, msg string) zitiql.ParseError
func ParseWhereClause ¶
func ParseWhereClause(str string, imap *IdentifierMap) (squirrel.Sqlizer, []error)
Types ¶
type IdentifierMap ¶
func (*IdentifierMap) Fields ¶
func (im *IdentifierMap) Fields() []string
type IdentifierOps ¶
func (*IdentifierOps) Merge ¶
func (io *IdentifierOps) Merge(io2 *IdentifierOps)
type IdentifierTranslations ¶
type InSubSelect ¶
type InSubSelect struct { Column string Select squirrel.SelectBuilder }
func (InSubSelect) ToSql ¶
func (ss InSubSelect) ToSql() (string, []interface{}, error)
type NotBetween ¶
type NotBetween binaryOp
func (NotBetween) ToSql ¶
func (b NotBetween) ToSql() (string, []interface{}, error)
type NotContains ¶
type NotContains unaryOp
func (NotContains) ToSql ¶
func (c NotContains) ToSql() (string, []interface{}, error)
type OpType ¶
type OpType string
const ( EqOp OpType = "=" NeqOp OpType = "!=" BetweenOp OpType = "BETWEEN" NotBetweenOp OpType = "NOT BETWEEN" InOp OpType = "IN" NotInOp OpType = "NOT IN" ContainsOp OpType = "CONTAINS" NotContainsOp OpType = "NOT CONTAINS" LtOp OpType = "<" LtEOp OpType = "<=" GtOp OpType = ">" GtEOp OpType = ">=" )
type ParseError ¶
type ParseError struct { Line int `json:"line"` Column int `json:"column"` Symbol string `json:"symbol"` Message string `json:"message"` }
func NewParseError ¶
func NewParseError(pe *zitiql.ParseError) *ParseError
func (*ParseError) Error ¶
func (e *ParseError) Error() string
type ResolverType ¶
type ResolverType string
const ( ConjResolver ResolverType = "CONJ" GroupResolver ResolverType = "GROUP" OpResolver ResolverType = "OP" )
type Sort ¶
type Sort []SortField
func ParseOrderBy ¶
func ParseOrderBy(str string, imap *IdentifierMap) (*Sort, error)
type ToSquirrelListener ¶
type ToSquirrelListener struct { *zitiql.BaseZitiQlListener Predicate squirrel.Sqlizer PrintRuleLocation bool PrintChildren bool IdentifierOps IdentifierOps IdentifierErrors []zitiql.ParseError // contains filtered or unexported fields }
func NewSquirrelListener ¶
func NewSquirrelListener() *ToSquirrelListener
func NewSquirrelListenerWithMap ¶
func NewSquirrelListenerWithMap(identifierMap *IdentifierMap) *ToSquirrelListener
func (*ToSquirrelListener) EnterAndConjunction ¶
func (z *ToSquirrelListener) EnterAndConjunction(c *zitiql.AndConjunctionContext)
EnterAndConjunction is called when entering the AndConjunction production.
func (*ToSquirrelListener) EnterBetweenDateOp ¶
func (z *ToSquirrelListener) EnterBetweenDateOp(c *zitiql.BetweenDateOpContext)
EnterBetweenDateOp is called when entering the BetweenDateOp production.
func (*ToSquirrelListener) EnterBetweenNumberOp ¶
func (z *ToSquirrelListener) EnterBetweenNumberOp(c *zitiql.BetweenNumberOpContext)
EnterBetweenNumberOp is called when entering the BetweenNumberOp production.
func (*ToSquirrelListener) EnterBinaryContainsOp ¶
func (z *ToSquirrelListener) EnterBinaryContainsOp(c *zitiql.BinaryContainsOpContext)
EnterBinaryContainsOp is called when entering the BinaryContainsOp production.
func (*ToSquirrelListener) EnterBinaryEqualToBoolOp ¶
func (z *ToSquirrelListener) EnterBinaryEqualToBoolOp(c *zitiql.BinaryEqualToBoolOpContext)
EnterBinaryEqualToBoolOp is called when entering the BinaryEqualToBoolOp production.
func (*ToSquirrelListener) EnterBinaryEqualToDatetimeOp ¶
func (z *ToSquirrelListener) EnterBinaryEqualToDatetimeOp(c *zitiql.BinaryEqualToDatetimeOpContext)
EnterBinaryEqualToDatetimeOp is called when entering the BinaryEqualToDatetimeOp production.
func (*ToSquirrelListener) EnterBinaryEqualToNullOp ¶
func (z *ToSquirrelListener) EnterBinaryEqualToNullOp(c *zitiql.BinaryEqualToNullOpContext)
EnterBinaryEqualToNullOp is called when entering the BinaryEqualToNullOp production.
func (*ToSquirrelListener) EnterBinaryEqualToNumberOp ¶
func (z *ToSquirrelListener) EnterBinaryEqualToNumberOp(c *zitiql.BinaryEqualToNumberOpContext)
EnterBinaryEqualToNumberOp is called when entering the BinaryEqualToNumberOp production.
func (*ToSquirrelListener) EnterBinaryEqualToStringOp ¶
func (z *ToSquirrelListener) EnterBinaryEqualToStringOp(c *zitiql.BinaryEqualToStringOpContext)
EnterBinaryEqualToStringOp is called when entering the BinaryEqualToStringOp production.
func (*ToSquirrelListener) EnterBinaryGreaterThanDatetimeOp ¶
func (z *ToSquirrelListener) EnterBinaryGreaterThanDatetimeOp(c *zitiql.BinaryGreaterThanDatetimeOpContext)
EnterBinaryGreaterThanDatetimeOp is called when entering the BinaryGreaterThanDatetimeOp production.
func (*ToSquirrelListener) EnterBinaryGreaterThanNumberOp ¶
func (z *ToSquirrelListener) EnterBinaryGreaterThanNumberOp(c *zitiql.BinaryGreaterThanNumberOpContext)
EnterBinaryGreaterThanNumberOp is called when entering the BinaryGreaterThanNumberOp production.
func (*ToSquirrelListener) EnterBinaryLessThanDatetimeOp ¶
func (z *ToSquirrelListener) EnterBinaryLessThanDatetimeOp(c *zitiql.BinaryLessThanDatetimeOpContext)
EnterBinaryLessThanDatetimeOp is called when entering the BinaryLessThanDatetimeOp production.
func (*ToSquirrelListener) EnterBinaryLessThanNumberOp ¶
func (z *ToSquirrelListener) EnterBinaryLessThanNumberOp(c *zitiql.BinaryLessThanNumberOpContext)
EnterBinaryLessThanNumberOp is called when entering the BinaryLessThanNumberOp production.
func (*ToSquirrelListener) EnterEnd ¶
func (z *ToSquirrelListener) EnterEnd(c *zitiql.EndContext)
EnterEnd is called when entering the End production.
func (*ToSquirrelListener) EnterGroup ¶
func (z *ToSquirrelListener) EnterGroup(c *zitiql.GroupContext)
EnterGroup is called when entering the Group production.
func (*ToSquirrelListener) EnterInDatetimeArrayOp ¶
func (z *ToSquirrelListener) EnterInDatetimeArrayOp(c *zitiql.InDatetimeArrayOpContext)
EnterInDatetimeArrayOp is called when entering the InDatetimeArrayOp production.
func (*ToSquirrelListener) EnterInNumberArrayOp ¶
func (z *ToSquirrelListener) EnterInNumberArrayOp(c *zitiql.InNumberArrayOpContext)
EnterInNumberArrayOp is called when entering the InNumberArrayOp production.
func (*ToSquirrelListener) EnterInStringArrayOp ¶
func (z *ToSquirrelListener) EnterInStringArrayOp(c *zitiql.InStringArrayOpContext)
EnterInStringArrayOp is called when entering the InStringArrayOp production.
func (*ToSquirrelListener) EnterOperationOp ¶
func (z *ToSquirrelListener) EnterOperationOp(c *zitiql.OperationOpContext)
EnterOperationOp is called when entering the OperationOp production.
func (*ToSquirrelListener) EnterOrConjunction ¶
func (z *ToSquirrelListener) EnterOrConjunction(c *zitiql.OrConjunctionContext)
EnterOrConjunction is called when entering the OrConjunction production.
func (*ToSquirrelListener) ExitAndConjunction ¶
func (z *ToSquirrelListener) ExitAndConjunction(c *zitiql.AndConjunctionContext)
ExitAndConjunction is called when exiting the AndConjunction production.
func (*ToSquirrelListener) ExitBetweenDateOp ¶
func (z *ToSquirrelListener) ExitBetweenDateOp(c *zitiql.BetweenDateOpContext)
ExitBetweenDateOp is called when exiting the BetweenDateOp production.
func (*ToSquirrelListener) ExitBetweenNumberOp ¶
func (z *ToSquirrelListener) ExitBetweenNumberOp(c *zitiql.BetweenNumberOpContext)
ExitBetweenNumberOp is called when exiting the BetweenNumberOp production.
func (*ToSquirrelListener) ExitBinaryContainsOp ¶
func (z *ToSquirrelListener) ExitBinaryContainsOp(c *zitiql.BinaryContainsOpContext)
ExitBinaryContainsOp is called when exiting the BinaryContainsOp production.
func (*ToSquirrelListener) ExitBinaryEqualToBoolOp ¶
func (z *ToSquirrelListener) ExitBinaryEqualToBoolOp(c *zitiql.BinaryEqualToBoolOpContext)
ExitBinaryEqualToBoolOp is called when exiting the BinaryEqualToBoolOp production.
func (*ToSquirrelListener) ExitBinaryEqualToDatetimeOp ¶
func (z *ToSquirrelListener) ExitBinaryEqualToDatetimeOp(c *zitiql.BinaryEqualToDatetimeOpContext)
ExitBinaryEqualToDatetimeOp is called when exiting the BinaryEqualToDatetimeOp production.
func (*ToSquirrelListener) ExitBinaryEqualToNullOp ¶
func (z *ToSquirrelListener) ExitBinaryEqualToNullOp(c *zitiql.BinaryEqualToNullOpContext)
ExitBinaryEqualToNullOp is called when exiting the BinaryEqualToNullOp production.
func (*ToSquirrelListener) ExitBinaryEqualToNumberOp ¶
func (z *ToSquirrelListener) ExitBinaryEqualToNumberOp(c *zitiql.BinaryEqualToNumberOpContext)
ExitBinaryEqualToNumberOp is called when exiting the BinaryEqualToNumberOp production.
func (*ToSquirrelListener) ExitBinaryEqualToStringOp ¶
func (z *ToSquirrelListener) ExitBinaryEqualToStringOp(c *zitiql.BinaryEqualToStringOpContext)
ExitBinaryEqualToStringOp is called when exiting the BinaryEqualToStringOp production.
func (*ToSquirrelListener) ExitBinaryGreaterThanDatetimeOp ¶
func (z *ToSquirrelListener) ExitBinaryGreaterThanDatetimeOp(c *zitiql.BinaryGreaterThanDatetimeOpContext)
ExitBinaryGreaterThanDatetimeOp is called when exiting the BinaryGreaterThanDatetimeOp production.
func (*ToSquirrelListener) ExitBinaryGreaterThanNumberOp ¶
func (z *ToSquirrelListener) ExitBinaryGreaterThanNumberOp(c *zitiql.BinaryGreaterThanNumberOpContext)
ExitBinaryGreaterThanNumberOp is called when exiting the BinaryGreaterThanNumberOp production.
func (*ToSquirrelListener) ExitBinaryLessThanDatetimeOp ¶
func (z *ToSquirrelListener) ExitBinaryLessThanDatetimeOp(c *zitiql.BinaryLessThanDatetimeOpContext)
ExitBinaryLessThanDatetimeOp is called when exiting the BinaryLessThanDatetimeOp production.
func (*ToSquirrelListener) ExitBinaryLessThanNumberOp ¶
func (z *ToSquirrelListener) ExitBinaryLessThanNumberOp(c *zitiql.BinaryLessThanNumberOpContext)
ExitBinaryLessThanNumberOp is called when exiting the BinaryLessThanNumberOp production.
func (*ToSquirrelListener) ExitEnd ¶
func (z *ToSquirrelListener) ExitEnd(c *zitiql.EndContext)
ExitEnd is called when exiting the End production.
func (*ToSquirrelListener) ExitGroup ¶
func (z *ToSquirrelListener) ExitGroup(c *zitiql.GroupContext)
ExitGroup is called when exiting the Group production.
func (*ToSquirrelListener) ExitInDatetimeArrayOp ¶
func (z *ToSquirrelListener) ExitInDatetimeArrayOp(c *zitiql.InDatetimeArrayOpContext)
ExitInDatetimeArrayOp is called when exiting the InDatetimeArrayOp production.
func (*ToSquirrelListener) ExitInNumberArrayOp ¶
func (z *ToSquirrelListener) ExitInNumberArrayOp(c *zitiql.InNumberArrayOpContext)
ExitInNumberArrayOp is called when exiting the InNumberArrayOp production.
func (*ToSquirrelListener) ExitInStringArrayOp ¶
func (z *ToSquirrelListener) ExitInStringArrayOp(c *zitiql.InStringArrayOpContext)
ExitInStringArrayOp is called when exiting the InStringArrayOp production.
func (*ToSquirrelListener) ExitOperationOp ¶
func (z *ToSquirrelListener) ExitOperationOp(c *zitiql.OperationOpContext)
ExitOperationOp is called when exiting the OperationOp production.
func (*ToSquirrelListener) ExitOrConjunction ¶
func (z *ToSquirrelListener) ExitOrConjunction(c *zitiql.OrConjunctionContext)
ExitOrConjunction is called when exiting the OrConjunction production.
func (*ToSquirrelListener) HandleError ¶
func (z *ToSquirrelListener) HandleError(err error)