DBIx::Connection::MySQL::PLSQL - PLSQL handler
use DBIx::PLSQLHandler; my $plsql_handler = new DBIx::PLSQLHandler( name => 'test_proc', connection => $connection, plsql => " DECLARE var1 INT; BEGIN SET var1 := :var2 + :var3; END;", bind_variables => { var2 => {type => 'SQL_INTEGER'}, var3 => {type => 'SQL_INTEGER'} } ); $plsql_handler->execute(var2 => 12, var3 => 8); or use DBIx::Connection; .... my $plsql_handler = $connection->plsql_handler( name => 'test_proc', connection => $connection, plsql => " DECLARE var1 INT; BEGIN :var1 := :var2 + :var3; END;", bind_variables => { var1 => {type => 'SQL_INTEGER'}, var2 => {type => 'SQL_INTEGER'}, var3 => {type => 'SQL_INTEGER'} } ); my $result_set = $plsql_handler->execute(var2 => 12, var3 => 8);
Returns sql statment definitio, Takes sql name as parameter.
Prepares plsql block
Removes plsql block wrapper
Generates plsql procedure.
Executes plsql block
Parses plsql code and replaces :var to var
mapping between DBI and database types. The following mapping is defined:
SQL_DECIMAL => 'NUMERIC', SQL_VARCHAR => 'VARCHAR', SQL_DATE =>'DATE', SQL_CHAR =>'CHAR', SQL_DOUBLE =>'NUMERIC', SQL_INTEGER =>'INT', SQL_BOOLEAN =>'BOOLEAN',
Returns
The DBIx::Connection::MySQL::PLSQL 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::SQLHandler.
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.