I was still worried about that "two words" table bug, so I tried myself on the
parser todo.
I skimmed through the code and found parsers at the following spots:
(tell me if I missed something)
1. AbstractJdbc2Statement.replaceProcessing
2. AbstractJdbc2Statement.modifyJdbcCall
3. V2Query constructor
4. v3/QueryExecutorImpl.parseQuery
5. AbstractJdbc2ResultSet.parseQuery
Problems I discovered:
Number 3 and 4 do not handle an escaped literal quote, i.e. \'
Number 5 doesn't handle (among other things) any quotes, joins, unions.
Finally, none of the above handle dollar quoting.
Attached you'll find a QueryParser class I've written that has all the
functionality that is implemented in the above methods and handles dollar
quoting. It parses the query in one run, so I believe it's pretty fast.
For testing purposes it has a main method so you can fire queries at it and it
will show you the determined subqueries and their fragments (delimited by
X?X).
I hope it's what you had in mind with the parser todo.
The class still needs extensive testing but I wanted to make sure that I'm
doing the right thing first...so what are your thoughts?
Uli