GSP
Quick Navigator

Search Site

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

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CLASS::DBI::QUERY (3)

.ds Aq ’

NAME

Class::DBI::Query - Deprecated SQL manager for Class::DBI

CONTENTS

SYNOPSIS



        my $sth = Class::DBI::Query
                ->new({
                        owner => $class,
                        sqlname => $type,
                        essential => \@columns,
                        where_columns => \@where_cols,
                })
                ->run($val);



DESCRIPTION

This abstracts away many of the details of the Class::DBI underlying SQL mechanism. For the most part you probably don’t want to be interfacing directly with this.

The underlying mechanisms are not yet stable, and are subject to change at any time.

OPTIONS

A Query can have many options set before executing. Most can either be passed as an option to new(), or set later if you are building the query up dynamically:

    owner

The Class::DBI subclass that ’owns’ this query. In the vast majority of cases a query will return objects - the owner is the class of which instances will be returned.

    sqlname

This should be the name of a query set up using set_sql.

    where_clause

This is the raw SQL that will substituted into the ’WHERE %s’ in your query. If you have multiple %s’s in your query then you should supply a listref of where_clauses. This SQL can include placeholders, which will be used when you call run().

    essential

When retrieving rows from the database that match the WHERE clause of the query, these are the columns that we fetch back and pre-load the resulting objects with. By default this is the Essential column group of the owner class.

METHODS

where()



        $query->where($match, @columns);



This will extend your ’WHERE’ clause by adding a ’AND $column = ?’ (or whatever $match is, isntead of =) for each column passed. If you have multiple WHERE clauses this will extend the last one.

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


perl v5.20.3 CLASS::DBI::QUERY (3) 2004-04-25

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