I am new to Derby, and am trying to determine if the SQL parser in it can be used apart from a real database. For example, I want to be able to get a list of the tables referenced in an SQL statement. I believe this can be done by getting the ContextManager from a given jdbc embedded driver connection, and then getting the result set node from the query tree (see http://rickosborne.org/blog/2010/02/derby-svn-coldfusion-sql-parser/).
The problem I am running into is that the table(s) in the SQL do not actually exist in the Derby DB (and Derby rightfully checks this and responds with a java.sql.SQLSyntaxErrorException: "Table/View 'FOO' does not exist.") So...is there a way to configure the connection so that when one does prepareStatement(sql), the existence of the table isn't checked? (The connection is created using driver.connect("jdbc:derby:memory:dummy;create=true",props) )