Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
Class::DBI::Search::Basic(3) User Contributed Perl Documentation Class::DBI::Search::Basic(3)

Class::DBI::Search::Basic - Simple Class::DBI search

        my $searcher = Class::DBI::Search::Basic->new(
                $cdbi_class, @search_args

        my @results = $searcher->run_search;

        # Over in your Class::DBI subclass:
                search  => "Class::DBI::Search::Basic",
          isearch => "Class::DBI::Search::Plugin::CaseInsensitive",

This is the start of a pluggable Search infrastructure for Class::DBI.

At the minute Class::DBI::Search::Basic doubles up as both the default search within Class::DBI as well as the search base class. We will probably need to tease this apart more later and create an abstract base class for search plugins.

        my $searcher = Class::DBI::Search::Basic->new(
                $cdbi_class, @search_args

A Searcher is created with the class to which the results will belong, and the arguments passed to the search call by the user.

        if (my $order = $self->opt('order_by')) { ... }

The arguments passed to search may contain an options hash. This will return the value of a given option.

        my @results = $searcher->run_search;
        my $iterator = $searcher->run_search;

Actually run the search.

The actual mechanics of generating the SQL and executing it split up into a variety of methods for you to override.

run_search() is implemented as:

  return $cdbi->sth_to_objects($self->sql, $self->bind);

Where sql() is


There are also a variety of private methods underneath this that could be overriden in a pinch, but if you need to do this I'd rather you let me know so that I can make them public, or at least so that I don't remove them from under your feet.

2005-09-12 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.