PHP Classes

pl2method: Execute PgSQL stored procedures as class functions

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 287 All time: 7,533 This week: 455Up
Version License PHP version Categories
pl2method 0.0.2BSD License5.1PHP 5, Databases, Language
Description 

Author

This class can be used to execute stored procedures on a PostgreSQL database by calling the class functions.

It uses PHP 5 __call function to map class function calls to execute stored procedures with the same name on a given PostgreSQL database schema.

The class passes function parameter values to the stored procedure as its parameters. If the values do not match the procedure expected types, the class throws an exception.

It returns a PDO statement object that can be used to retrieve any result sets returned from the execution of the stored procedure.

Innovation Award
PHP Programming Innovation award nominee
November 2008
Number 3


Prize: One book of choice by O'Reilly
Stored procedures are often used to execute complex database queries from inside the database server to make them run as fast as possible.

It is necessary to execute a query with special syntax to call a stored procedure passing eventual arguments.

This class provides a general solution to call PostgreSQL stored procedures as if they are actual PHP class functions.

This is an elegant solution that avoids the requirement to learn the syntax and pass the values to the procedure arguments.

Manuel Lemos
Picture of Ivo Augusto Nascimento
Name: Ivo Augusto Nascimento <contact>
Classes: 1 package by
Country: Brazil Brazil
Age: 45
All time rank: 3867311 in Brazil Brazil
Week rank: 164 Up12 in Brazil Brazil Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (3)  
File Role Description
Plain text file ipgpl.class.php Class ipgpl.class.php
Plain text file ipgtype.class.php Class ipgtype.class.php
Accessible without login Plain text file teste.php Example teste.php

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:287
This week:0
All time:7,533
This week:455Up
User Comments (1)
great class
15 years ago (osniel)
62%StarStarStarStar