I was still worried about that "two words" table bug, so I tried myself on the
I skimmed through the code and found parsers at the following spots:
(tell me if I missed something)
3. V2Query constructor
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
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?
pgsql-jdbc by date
|Next:||From: Oliver Jowett||Date: 2004-11-01 11:06:25|
|Subject: Re: General Parser|
|Previous:||From: Ulrich Meis||Date: 2004-10-31 20:29:57|
|Subject: Re: persistence of java objects|