++ed by:
KEEDI

1 PAUSE user

Stevan Little
and 1 contributors

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 our execute 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 the prepare method of our dbh. It will return a DBI statement handle.

execute

This will call prepare to get the DBI statement handle, then it will call execute 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 the execute_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 our dbh.

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.

http://www.iinteractive.com

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.