| DBIx-Connection documentation | view source | Contained in the DBIx-Connection distribution. |
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
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.
| DBIx-Connection documentation | view source | Contained in the DBIx-Connection distribution. |