Condition could have more detailed fields
afilina opened this issue · comments
Anna Filina commented
Currently, when I parse a query, I get WHERE as Condition
instances. These have an expr
field, which is just a string and not very useful when analyzing a query. It would be really nice if we could be able to get more detail from that, like the operator, operands, etc.
Examples:
// c.id = 2
[
leftOperand: ColumnReference [ column: 'id', tableAlias: 'c' ] ,
operator: Equals []
rightOperand: Constant [ value: 2 ]
]
// customer.address_id IS NOT NULL
[
leftOperand: ColumnReference [ column: 'address_id', tableName: 'customer' ] ,
operator: IsNotNull
rightOperand: null
]
Maurício Meneghini Fauth commented
Thank you. We will work on this.