View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Matt S Trout > DBIx-Class-0.08202 > DBIx::Class::SQLMaker



Annotate this POD



New  23
Open  44
Stalled  13
View/Report Bugs
Source   Latest Release: DBIx-Class-0.08249_05


DBIx::Class::SQLMaker - An SQL::Abstract-based SQL maker class


This module is a subclass of SQL::Abstract and includes a number of DBIC-specific workarounds, not yet suitable for inclusion into the SQL::Abstract core. It also provides all (and more than) the functionality of SQL::Abstract::Limit, see DBIx::Class::SQLMaker::LimitDialects for more info.

Currently the enhancements to SQL::Abstract are:



Used to explicitly specify an SQL identifier. Takes a plain string as value which is then invariably treated as a column name (and is being properly quoted if quoting has been requested). Most useful for comparison of two columns:

    my %where = (
        priority => { '<', 2 },
        requestor => { -ident => 'submitter' }

which results in:

    $stmt = 'WHERE "priority" < ? AND "requestor" = "submitter"';
    @bind = ('2');


The -value operator signals that the argument to the right is a raw bind value. It will be passed straight to DBI, without invoking any of the SQL::Abstract condition-parsing logic. This allows you to, for example, pass an array as a column value for databases that support array datatypes, e.g.:

    my %where = (
        array => { -value => [1, 2, 3] }

which results in:

    $stmt = 'WHERE array = ?';
    @bind = ([1, 2, 3]);


See "CONTRIBUTORS" in DBIx::Class.


You may distribute this code under the same terms as Perl itself.

syntax highlighting: