ConvertTypes defers the call to the child expressions if they're logical Otherwise performs type conversion on the child expressions if necessary
(fieldTypeDescriptor FieldTypeDescriptor)
| 356 | // ConvertTypes defers the call to the child expressions if they're logical |
| 357 | // Otherwise performs type conversion on the child expressions if necessary |
| 358 | func (binaryExpression *BinaryExpression) ConvertTypes(fieldTypeDescriptor FieldTypeDescriptor) (errors []error) { |
| 359 | if !binaryExpression.IsComparison() { |
| 360 | if logicalExpression, ok := binaryExpression.lhs.(LogicalExpression); ok { |
| 361 | errors = append(errors, logicalExpression.ConvertTypes(fieldTypeDescriptor)...) |
| 362 | } |
| 363 | |
| 364 | if logicalExpression, ok := binaryExpression.rhs.(LogicalExpression); ok { |
| 365 | errors = append(errors, logicalExpression.ConvertTypes(fieldTypeDescriptor)...) |
| 366 | } |
| 367 | |
| 368 | return |
| 369 | } |
| 370 | |
| 371 | if err := binaryExpression.processDateComparison(fieldTypeDescriptor); err != nil { |
| 372 | errors = append(errors, err) |
| 373 | } else if err := binaryExpression.processGlobComparison(fieldTypeDescriptor); err != nil { |
| 374 | errors = append(errors, err) |
| 375 | } else if err := binaryExpression.processRegexComparison(fieldTypeDescriptor); err != nil { |
| 376 | errors = append(errors, err) |
| 377 | } |
| 378 | |
| 379 | return |
| 380 | } |
| 381 | |
| 382 | func (binaryExpression *BinaryExpression) processDateComparison(fieldTypeDescriptor FieldTypeDescriptor) (err error) { |
| 383 | isDateComparison, dateString, datePtr := binaryExpression.isDateComparison(fieldTypeDescriptor) |
nothing calls this directly
no test coverage detected