![]() |
![]()
| ![]() |
![]()
NAMEClass::DBI::AbstractSearch - Abstract Class::DBI's SQL with SQL::Abstract::Limit SYNOPSISpackage CD::Music; use Class::DBI::AbstractSearch; package main; my @music = CD::Music->search_where( artist => [ 'Ozzy', 'Kelly' ], status => { '!=', 'outdated' }, ); my @misc = CD::Music->search_where( { artist => [ 'Ozzy', 'Kelly' ], status => { '!=', 'outdated' } }, { order_by => "reldate DESC", limit_dialect => 'LimitOffset', limit => 1 offset => 2 }); DESCRIPTIONClass::DBI::AbstractSearch is a Class::DBI plugin to glue SQL::Abstract::Limit into Class::DBI. METHODSUsing this module adds following methods into your data class.
Any other attributes are passed to the SQL::Abstract::Limit constructor, and can be used to control how queries are created. For example, to use 'AND' instead of 'OR' by default, use: $class->search_where(\%where, { logic => 'AND' }); AUTHORTatsuhiko Miyagawa <miyagawa@bulknews.net> with some help from cdbi-talk mailing 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 ALSOClass::DBI, SQL::Abstract, SQL::Abstract::Limit POD ERRORSHey! The above document had some coding errors, which are explained below:
|