Parsing sql and the QueryTreeNode

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Parsing sql and the QueryTreeNode

Ostermueller Erik - eoster
Hello all,

I'm trying to leverage the derby SQL parser in my own app, just like the
guy in this post:

http://mail-archives.apache.org/mod_mbox/db-derby-user/200501.mbox/%3C41
[hidden email]%3E

The reply from "Kathey Marsden" suggests that you could just pump the jj
file through javacc and voilla--Instant SQL Compiler.  This really isn't
the case -- the jj file is tightly integrated with Derby.

So, perhaps you could help me with this:  
Does anyone have a tester or sample code that launches a database and
submits SQL in the same vm as the db (bypassing JDBC)?

That way, my own code could instantiate the Parser and get a
QueryTreeNode in return.

Thank you,

--Erik Ostermueller


**********************************************************************
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.

Reply | Threaded
Open this post in threaded view
|

Re: Parsing sql and the QueryTreeNode

Katherine Marsden-2
Ostermueller Erik - eoster wrote:

>
>The reply from "Kathey Marsden" suggests that you could just pump the jj
>file through javacc and voilla--Instant SQL Compiler.  This really isn't
>the case -- the jj file is tightly integrated with Derby.
>
>  
>

I certainly did not mean to give that impression. I was answering the
bit asking for a pointer to how Derby parses an SQL statement. . (This
was before I learned about sniipping out the parts not relevant to my
response).  You are right. sqlgrammar.jj  is tightly integrated with
Derby.

I don't have any answers to your questions  unfortunately. I hope this
clarifies my earlier response.

Kathey