NAME
FeyX::Active::SQL - A role to represent an active SQL statement
DESCRIPTION
This is a role that all the FeyX::Active::SQL::* objects consume, it contains all the basic logic to manage and execute the SQL commands.
ATTRIBUTES
- dbh
-
This is a DBI database handle.
- execute_rv
-
This is the return value of
executeon the given DBI statement handle in ourexecutemethod.
METHODS
- prepare_sql
-
This simply calls
sqlto get the SQL code that Fey::SQL will generate for us. - prepare
-
This calls
prepare_sqland passes that SQL to thepreparemethod of ourdbh. It will return a DBI statement handle. - execute
-
This will call
prepareto get the DBI statement handle, then it will callexecuteon the statement handle and pass in the bind params that Fey::SQL will generate for us.This will save any return value of
executein theexecute_rvattribute and then return the DBI statement handle. - sql
-
This just wraps the Fey::SQL
sqlmethod to make sure that we are passing in ourdbh.
BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.
AUTHOR
Stevan Little <stevan.little@iinteractive.com>
COPYRIGHT AND LICENSE
Copyright 2009-2010 Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.