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
execute
on the given DBI statement handle in ourexecute
method.
METHODS
- prepare_sql
-
This simply calls
sql
to get the SQL code that Fey::SQL will generate for us. - prepare
-
This calls
prepare_sql
and passes that SQL to theprepare
method of ourdbh
. It will return a DBI statement handle. - execute
-
This will call
prepare
to get the DBI statement handle, then it will callexecute
on the statement handle and pass in the bind params that Fey::SQL will generate for us.This will save any return value of
execute
in theexecute_rv
attribute and then return the DBI statement handle. - sql
-
This just wraps the Fey::SQL
sql
method 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.