Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

data::phrasebook::sql::query(3pm) [debian man page]

Data::Phrasebook::SQL::Query(3pm)			User Contributed Perl Documentation			 Data::Phrasebook::SQL::Query(3pm)

NAME
Data::Phrasebook::SQL::Query - Query Extension to the SQL/DBI Phrasebook Model. SYNOPSIS
my $q = $book->query( 'find_author' ); my $q = $book->query( 'find_author', 'Dictionary' ); DESCRIPTION
An extension to the SQL class to specifically handle the DBI interface for each query requested. CONSTRUCTOR
new Not to be accessed directly, but via the parent Data::Phrasebook, by specifying the class as SQL. METHODS
sql Get/set the current "sql" statement, in a form suitable for passing straight to DBI. sth Get/set the current statement handle. args Return list of arguments that will be used as bind parameters to any placeholders. Any given arguments will replace the whole list. Returns list in list context, arrayref in scalar. order As for "args", but regarding the corresponding list of argument names. The assorted "order_XXX" methods are supported as for "args_XXX". dbh Get/set the database handle. PREPARATION
/ EXECUTING METHODS execute Executes the query. Returns the result of "DBI::execute". Any arguments are given to "order_args" with the return of that method being used as arguments to "DBI::execute". If no arguments, uses those already specified. Calls "prepare" if necessary. order_args Given a hash or hashref of keyword to value mappings, organises an array of arguments suitable for use as bind parameters in the order needed by the query itself. prepare Prepares the query for execution. This method is called implicitly in most cases so you generally don't need to know about it. rebind Rebinds any bound values. Lets one pass a scalar reference in the arguments to "order_args" and have the bound value update if the original scalar changes. This method is not needed externally to this class. DELEGATED METHODS
Any method not mentioned above is given to the statement handle. All these delegations will implicitly call "prepare". SEE ALSO
Data::Phrasebook, Data::Phrasebook::SQL. SUPPORT
Please see the README file. AUTHOR
Original author: Iain Campbell Truskett (16.07.1979 - 29.12.2003) Maintainer: Barbie <barbie@cpan.org> since January 2004. for Miss Barbell Productions <http://www.missbarbell.co.uk>. COPYRIGHT AND LICENSE
Copyright (C) 2003 Iain Truskett. Copyright (C) 2004-2010 Barbie for Miss Barbell Productions. This module is free software; you can redistribute it and/or modify it under the Artistic Licence v2. perl v5.10.1 2010-08-31 Data::Phrasebook::SQL::Query(3pm)

Check Out this Related Man Page

Class::DBI::Query(3pm)					User Contributed Perl Documentation				    Class::DBI::Query(3pm)

NAME
Class::DBI::Query - Deprecated SQL manager for Class::DBI 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. perl v5.12.4 2004-04-25 Class::DBI::Query(3pm)
Man Page