On Thu May 17 04:13:42 2018, RRWO wrote:
Show quoted text>
> > Unfortunately, this module cannot be used with DBIx::Class, because
> > DBIx::Class creates its own instance of SQL::Abstract and has no API
> > to let the client instantiate from any other class.
>
> If I recall correctly, you can set the sql_maker_class in storage:
>
> $schema->storage->sql_maker_class( 'SQL::Abstract::More' )
>
> See
>
https://metacpan.org/source/RIBASUSHI/DBIx-Class-
> 0.082841/t/sqlmaker/limit_dialects/custom.t
>
> I have not actually tested how well that works. You may want to look
> into
> that and update the documentation accordingly.
Hi,
Thanks for the heads up.
After some investigations : you are right, there is a "sql_maker_class()" method, but it is undocumented and obviously meant to be used internally, not by DBIC clients. Besides, that method expects a subclass of DBIC::SqlMaker, which itself is a subclass of SQL::Abstract. SQL::Abstract::More is also a subclass of SQL::Abstract but does not qualify as a subclass of SqlMaker. One could imagine creating a new class which would multiply inherit from both, but that would be mostly useless because the DBIC API for working with resultsets depends heavily on old-style positional arguments to the select() method; therefore all additional features of SQL::Abstract::More would not be accessible.
Therefore I do not see any sensible way in which SQL::Abstract::More and DBIx::Class could work together. If you think differently, please show me an example; I would happily include it in the documentation.
Regards, Laurent Dami