Data-ObjectDriver
view release on metacpan or search on metacpan
lib/Data/ObjectDriver/SQL.pm view on Meta::CPAN
=head2 C<$sql-E<gt>add_index_hint($table, \@hints)>
Addes the index hint into a C<SELECT> query. The structure for the set of
C<\@hints> are arrayref of hashrefs containing these members:
=over 4
=item * C<type> (scalar)
The name of the type. "USE", "IGNORE or "FORCE".
=item * C<list> (arrayref)
The list of name of indexes which to use.
=back
=head2 C<$sql-E<gt>as_sql()>
Returns the SQL fully representing the SQL statement C<$sql>.
=head2 C<$sql-E<gt>as_subquery($alias)>
Returns a string representation of C<$sql> as a subquery. C<$alias> is optional.
=head2 C<$sql-E<gt>as_sql_having()>
Returns the SQL representing the C<HAVING> portion of C<$sql>'s C<GROUP ...
HAVING> clause.
=head2 C<$sql-E<gt>as_sql_where()>
Returns the SQL representing C<$sql>'s C<WHERE> clause.
=head2 C<$sql-E<gt>as_limit()>
Returns the SQL for the C<LIMIT ... OFFSET> clause of the statement.
=head2 C<$sql-E<gt>as_aggregate($set)>
Returns the SQL representing the aggregation clause of type C<$set> for the SQL
statement C<$sql>. Reasonable values of C<$set> are C<ORDER> and C<GROUP>.
=head2 C<$sql-E<gt>as_escape()>
Returns a string representing the C<ESCAPE> clause for C<LIKE> predicates.
=head1 DIAGNOSTICS
=over 4
=item * C<Invalid/unsafe column name I<column>>
The column name you specified to C<add_where()> contained characters that are
not allowed in database column names. Only word characters and periods are
allowed. Perhaps you didn't filter punctuation out of a generated column name
correctly.
=back
=head1 BUGS AND LIMITATIONS
I<Data::ObjectDriver::SQL> does not provide the functionality for turning SQL
statements into instances of object classes.
=head1 SEE ALSO
=head1 LICENSE
I<Data::ObjectDriver> is free software; you may redistribute it and/or modify
it under the same terms as Perl itself.
=head1 AUTHOR & COPYRIGHT
Except where otherwise noted, I<Data::ObjectDriver> is Copyright 2005-2006
Six Apart, cpan@sixapart.com. All rights reserved.
=cut
( run in 0.542 second using v1.01-cache-2.11-cpan-39bf76dae61 )