Are columns recognized before expressions? For example, in an 'IN' expression such as, 'a.mycol IN (?,?,?)', will the column visitor fire first, before the InExpression visitor, always? I'd like to capture the column name in the IN expression. One way is to store columns in an ArrayList and then get the last index of said list in the InExpression visitor. It's working, but is this reliable/deterministic?
A followup question: is there any doc, or where in source code to learn about order of execution of visitors and parsing in general.
Thanks!
Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Are columns recognized before expressions? For example, in an 'IN' expression such as, 'a.mycol IN (?,?,?)', will the column visitor fire first, before the InExpression visitor, always? I'd like to capture the column name in the IN expression. One way is to store columns in an ArrayList and then get the last index of said list in the InExpression visitor. It's working, but is this reliable/deterministic?
A followup question: is there any doc, or where in source code to learn about order of execution of visitors and parsing in general.
Thanks!
Dave
Actually, using InExpression.getLeftExpression() seems to do the trick for this use case. I'm still curious about the op order though.