Eve::PgSqlFunction - a PostgreSQL stored function class.
my $foo = Eve::PgSqlFunction->new( connection => $pgsql_connection, name => 'foo', input_list => [ {'bar' => $pgsql_bigint}], output_list => [ {'bar' => $pgsql_bigint}, {'baz' => $pgsql_text}]); my $result_list = $foo->execute(value_hash => {'bar' => 123});
Eve::PgSqlFunction is an adapter class for PostgreSQL stored function. It adapts DBI DBD::Pg statement handle and encapsulates statement preparation and execution mechanisms.
sth
a service attribute containing a statement handle (not for regular use).
connection
a PostgreSQL connection (Eve::PgSqlConnection) object
name
a stored function name
input_list
an optional list of input parameters, each of which is specified as a structure like
{'parameter_name' => $parameter_type}
where the $parameter_type is a Eve::PgSqlType derivative.
$parameter_type
output_list
an optional list of output parameters specified, just like the input_list argument
is_set_returning
A boolean value depending of what do we expect from the function - a set or one row.
Eve::Error::Value
when input or output parameter definitions does not match the required definition format.
Executes the stored function.
value_hash
an optional hash of the input parameters substitutions where keys are parameter names and values are values to substitute.
A list of hashes corresponding to the rows returning from the stored function if is_set_returning is true or a hash of a single row otherwise.
in case when input values does not meet the signature of the stored function, when resulting columns set does not meet required output parameters or when 0 or more than 1 row returned in case of not set returning function.
Copyright 2012 Igor Zinovyev.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Eve, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eve
CPAN shell
perl -MCPAN -e shell install Eve
For more information on module installation, please visit the detailed CPAN module installation guide.