Re: General Parser

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: General Parser
Дата
Msg-id 41861A10.1000607@opencloud.com
обсуждение исходный текст
Ответ на General Parser  (Ulrich Meis <kenobi@halifax.rwth-aachen.de>)
Ответы Re: General Parser  (Ulrich Meis <kenobi@halifax.rwth-aachen.de>)
code duplication (was: Re: General Parser)  (Vadim Nasardinov <vadimn@redhat.com>)
stable release  (Dave Cramer <pg@fastcrypt.com>)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: General Parser
Следующее
От: Ulrich Meis
Дата:
Сообщение: Re: General Parser