Re: General Parser

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Ulrich Meis <kenobi(at)halifax(dot)rwth-aachen(dot)de>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: General Parser
Date: 2004-11-01 11:12:16
Message-ID: 41861A10.1000607@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Ulrich Meis wrote:

> 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.

> 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?

I think it's a good idea to unify all the parsing that needs to be done,
if only because it reduces code duplication.

That said, this still needs some work as the various different callers
need different parsing done. For example, we only care about splitting
queries into multiple statements when using the V3 protocol, we only
care about ? placeholders when parsing a query supplied via
prepareStatement, the { call } syntax only makes sense for
CallableStatements, and there's no need to disassemble the SELECT etc if
the application never uses an updatable resultset.

I'm not sure how easy it will be to have a single flexible parser and
still have low overhead for the cases where we don't want to completely
disassemble the query.

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ulrich Meis 2004-11-01 14:39:24 Re: General Parser
Previous Message Oliver Jowett 2004-11-01 11:06:25 Re: General Parser