DBIx::SQLHandler - Sql statement handler.
use DBIx::SQLHandler my $sql_handler = new DBIx::SQLHandler( name => 'emp_ins', connection => $connection, sql => "INSERT INTO emp(empno, ename) VALUES(?, ?)" ); $sql_handler->execute(1, 'Smith'); $sql_handler->execute(2, 'Witek'); my $sql_handler = new DBIx::SQLHandler( name => 'emp_upd', connection => $connection, sql => "UPDATE emp SET ename = ? WHERE empno = ?" ); $sql_handler->execute('Smith2',1); or use DBIx::Connection; ... my $sql_handler = $connection->sql_handler( name => 'emp_ins' sql => "INSERT INTO emp(empno, ename) VALUES(?, ?)", ); $sql_handler->execute(1, 'Smith');
Represents wrapper for sql statments. It manages sql statement's information within its state. If an error occurs on any stage (prepare, execute, binding) you will get full information including connection name, sql, binding variables. Caching statements (if using name). It gathers performance statistics (optionaly).
None.
Statement name.
Database connection.
Cursor handler.
SQL text for cursor.
Prepares the sql statement.
Prepare the statement.
Executes the statement.
Binds column to the statement.
Bind parameters to the statement.
Returns error messagem, takes error message, and optionally bind variables. If bind variables are passed in the sql's place holders are replaced with the bind_variables.
The DBIx::SQLHandler module is free software. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
Adrian Witas, adrian@webapp.strefa.pl
See also DBIx::Connection DBIx::QueryCursor DBIx::PLSQLHandler.
To install DBIx::Connection, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Connection
CPAN shell
perl -MCPAN -e shell install DBIx::Connection
For more information on module installation, please visit the detailed CPAN module installation guide.