NAME

Class::DBI::AbstractSearch - Abstract Class::DBI's SQL with SQL::Abstract

SYNOPSIS

package CD::Music;
use Class::DBI::AbstractSearch;

pacage main;
my @music = CD::Music->search_where(
    artist => [ 'Ozzy', 'Kelly' ],
    status => { '!=', 'outdated' },
);

my @misc = CD::Music->search_where(
    { artist => [ 'Ozzy', 'Kelly' ],
      status => { '!=', 'outdated' } },
    { order  => "reldate DESC" });

DESCRIPTION

Class::DBI::AbstractSearch is a Class::DBI plugin to glue SQL::Abstract into Class::DBI.

METHODS

Using this module adds following methods into your data class.

search_where
$class->search_where(%where);

Takes hash to specify WHERE clause. See SQL::Abstract for hash options.

$class->search_where(\%where,\%attrs);

Takes hash reference to specify WHERE clause. See SQL::Abstract for hash options. Takes a hash reference to specify additional query attributes. Valid attributes are :

  • order

    Array reference of fields that will be used to order the results of your query.

AUTHOR

Tatsuhiko Miyagawa <miyagawa@bulknews.net> with some help from cdbi-talk maling list, especially:

Tim Bunce
Simon Wilcox
Tony Bowden

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Class::DBI, SQL::Abstract

1 POD Error

The following errors were encountered while parsing the POD:

Around line 87:

You forgot a '=back' before '=head1'