1Class::DBI::Query(3)  User Contributed Perl Documentation Class::DBI::Query(3)
2
3
4

NAME

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

SYNOPSIS

9               my $sth = Class::DBI::Query
10                       ->new({
11                               owner => $class,
12                               sqlname => $type,
13                               essential => \@columns,
14                               where_columns => \@where_cols,
15                       })
16                       ->run($val);
17

DESCRIPTION

19       This abstracts away many of the details of the Class::DBI underlying
20       SQL mechanism. For the most part you probably don't want to be inter‐
21       facing directly with this.
22
23       The underlying mechanisms are not yet stable, and are subject to change
24       at any time.
25

OPTIONS

27       A Query can have many options set before executing. Most can either be
28       passed as an option to new(), or set later if you are building the
29       query up dynamically:
30
31       owner
32
33       The Class::DBI subclass that 'owns' this query. In the vast majority of
34       cases a query will return objects - the owner is the class of which
35       instances will be returned.
36
37       sqlname
38
39       This should be the name of a query set up using set_sql.
40
41       where_clause
42
43       This is the raw SQL that will substituted into the 'WHERE %s' in your
44       query. If you have multiple %s's in your query then you should supply a
45       listref of where_clauses. This SQL can include placeholders, which will
46       be used when you call run().
47
48       essential
49
50       When retrieving rows from the database that match the WHERE clause of
51       the query, these are the columns that we fetch back and pre-load the
52       resulting objects with. By default this is the Essential column group
53       of the owner class.
54

METHODS

56       where()
57
58               $query->where($match, @columns);
59
60       This will extend your 'WHERE' clause by adding a 'AND $column = ?' (or
61       whatever $match is, isntead of "=") for each column passed. If you have
62       multiple WHERE clauses this will extend the last one.
63
64
65
66perl v5.8.8                       2006-11-05              Class::DBI::Query(3)
Impressum