Apache::Wyrd::Query - SQL-handle (DBI) object for Wyrds
<Apache::Wyrd::Query> update table set row='value' where row='old_value'; delete from table where row='obsolete value' </Apache::Wyrd::Query> <Apache::Wyrd::Query query="delete from table where row=23" /> <Apache::Wyrd::Query> update table set row=$:row_value where row='old_value' <Apache::Wyrd::Var name="row_value">value</Apache::Wyrd::Var> </Apache::Wyrd::Query>
Provides a DBI-style statement handle to the Wyrd that encloses it. The parent must implement the register_query method to make use of it. The Query Wyrd passes a reference of itself to the register_query method.
register_query
What columns the statement will return. Automatically defined under MySQL. Dev Note: Derived classes for other DBAs should subclass the _set_cols method for DBDs other than MySQL if the automatic maintenance of this attribute is to be accomplished and required.
_set_cols
What statement to execute. If not defined, will default to the enclosed text. Multiple queries can be given, separated by a semicolon. If output is expected (via the sh method), only the final query in a series will be used.
sh
(format: (returns) name (arguments after self))
activate
Activate the Database Query, prepping the Query object to begin producing data. Should be called before any calls to sh.
cols
Return the column names, as an arrayref.
set_var
Use the Var object to change the value-placemarkers of the query. Items with a setter-style placemarker which matches the name of the object will be replaced with the object's value. This is for right-hand values only, as the value will be quoted by DBI.
quote
The DBI statement handle.
Reserves the _setup, _format_output, and _generate_output methods.
_setup
_format_output
_generate_output
Barry King <wyrd@nospam.wyrdwright.com>
General-purpose HTML-embeddable perl object
Copyright 2002-2007 Wyrdwright, Inc. and licensed under the GNU GPL.
See LICENSE under the documentation for Apache::Wyrd.
Apache::Wyrd
To install Apache::Wyrd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::Wyrd
CPAN shell
perl -MCPAN -e shell install Apache::Wyrd
For more information on module installation, please visit the detailed CPAN module installation guide.