You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Ankit Goel <an...@oracle.com> on 2007/03/23 14:04:15 UTC
Issue regarding SQL Parser support in Apache Jackrabbit Project
Hi,
I am looking for a SQL parser which should return me a JAVA object
representation of the input SQL components. I tried out the SQL Parser
which is provided as a part of Apache Jackrabbit project.
Repository repository = new TransientRepository();
Session session = repository.login();
SessionNamespaceResolver resolver = new SessionNamespaceResolver(session);
QueryRootNode queryRootNode = QueryParser.parse("select ename, dname
from emp , dept where dname = 1 and enaum = 2 and dname = enaum"
, Query.SQL,
resolver);
The last statement fails with InvalidQueryException. Even, using table
alias gives errors. However, the following input SQL works fine:
"select ename, dname from emp , dept where dname = 1 and enaum = 2".
I wanted to know as to what features of SQL are supported by this
Parser. Or, is there any other parser which I can use.
Please let me know if I am missing something here.
Thanks,
Ankit Goel
Re: Issue regarding SQL Parser support in Apache Jackrabbit Project
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On 3/23/07, Ankit Goel <an...@oracle.com> wrote:
> I am looking for a SQL parser which should return me a JAVA object
> representation of the input SQL components. I tried out the SQL Parser
> which is provided as a part of Apache Jackrabbit project.
> [...]
> I wanted to know as to what features of SQL are supported by this
> Parser. Or, is there any other parser which I can use.
> Please let me know if I am missing something here.
The SQL parser in Jackrabbit is only designed to support the SQL
subset specified in JSR 170. If you want parser for the full standard
SQL syntax, then a real database project like Apache Derby would
probably contain better tools.
BR,
Jukka Zitting