(operatorPosition binaryOperatorPosition)
| 106 | } |
| 107 | |
| 108 | func (operator *Operator) allowedTypes(operatorPosition binaryOperatorPosition) (fieldTypes []FieldType) { |
| 109 | allowedOperandTypes, ok := operatorAllowedOperandTypes[operator.operator.tokenType] |
| 110 | if !ok { |
| 111 | return |
| 112 | } |
| 113 | |
| 114 | allowedTypes, ok := allowedOperandTypes[operatorPosition] |
| 115 | if !ok { |
| 116 | return |
| 117 | } |
| 118 | |
| 119 | for fieldType := range allowedTypes { |
| 120 | fieldTypes = append(fieldTypes, fieldType) |
| 121 | } |
| 122 | |
| 123 | return |
| 124 | } |
| 125 | |
| 126 | const ( |
| 127 | queryDateFormat = "2006-01-02" |