[rt.cpan.org #86214] Difficulties writing a new dialect

"Jens Rehsack via RT" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
<URL: https://rt.cpan.org/Ticket/Display.html?id=86214 >

On Mon Jun 17 17:47:43 2013, MSCHWERN wrote:
> While answering a question on Stack Overflow about how to make
> SQL::Statement
> understand an Oracle dialect, I found it very difficult to puzzle out
> how to
> extend SQL. While the option to issue SQL commands is straight
> forward, it does
> not scale.

Because it's not designed to be. I always wanted to create such a thing for Perl6 - but ... you know ... missing tuit's, insufficient spare time, no business case - choose one ;)

> Information about how to write a subclass is scant and does not answer
> the
> question of how to add to the SQL dialect.

Indeed - even if the documentation at http://search.cpan.org/dist/SQL-Statement/lib/SQL/Parser.pm#dialect%28%29 is not as bad as you pretend.
But don't discuss RT#86213 here, I'm annoyed enough about opening random tickets instead of asking at dbi-dev@ or dbi-users@ as documentation (you refer - because you read it entirely otherwise you can't decide what is missing) suggest for such cases.

> There's little documentation on extending an existing dialect. I dug
> into the
> code and found get_config_from_hash could be extended (rather than the
> documented get_config) but could not puzzle out how to add a function
> like
> LENGTH().

Well - the functiom get_config_from_hash is introduced by yourself (see #53128). Please blame the responsible one ;)

> See my answer on SO for details.
> http://stackoverflow.com/a/17155334/14660

Your answer there is absolutely correct. And the is no intention to hurry with a newly written SQL::Parser (you're invited to do - but please on at least the quality the new code in SQL::Statement, DBI::DBD::SqlEngine & Co. have - neither the get_config_from_hash 
nor 1.15 and below are a reference).

BTW: I don't know what this ticket was good for. I assume it was a question and I hope the question is answered and the ticket can be closed. Otherwise, please feel free to clarify the goal of the ticket.

Cheers
Jens
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.