DBIx::Pg::CallFunction

Simple interface for calling PostgreSQL functions from Perl
Download

DBIx::Pg::CallFunction Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Joel Jacobson
  • Publisher web site:
  • http://search.cpan.org/~joeljac/

DBIx::Pg::CallFunction Tags


DBIx::Pg::CallFunction Description

DBIx::Pg::CallFunction is a Perl module that provides a simple efficient way to call PostgreSQL functions with from Perl code. It only support functions with named arguments, or functions with no arguments at all. This limitation reduces the mapping complexity, as multiple functions in PostgreSQL can share the same name, but with different input argument types.SYNOPSIS use DBI; use DBIx::Pg::CallFunction; my $dbh = DBI->connect("dbi:Pg:dbname=joel", 'joel', ''); my $pg = DBIx::Pg::CallFunction->new($dbh);Returning single-row single-column values: my $userid = $pg->get_userid_by_username({'username' => 'joel'}); # returns scalar 123Returning multi-row single-column values: my $hosts = $pg->get_user_hosts({userid => 123}); # returns array ref Returning single-row multi-column values: my $user_details = $pg->get_user_details({userid => 123}); # returns hash ref { firstname=>..., lastname=>... }Returning multi-row multi-column values: my $user_friends = $pg->get_user_friends({userid => 123}); # returns array ref of hash refs Product's homepage


DBIx::Pg::CallFunction Related Software