source: sandbox/2.5.1-evolucao/phpgwapi/inc/adodb/drivers/adodb-postgres9.inc.php @ 8222

Revision 8222, 1.6 KB checked in by angelo, 11 years ago (diff)

Ticket #3491 - Compatibilizar Expresso com novas versoes do PHP

Line 
1<?php
2/*
3 V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
4  Released under both BSD license and Lesser GPL library license.
5  Whenever there is any discrepancy between the two licenses,
6  the BSD license will take precedence.
7  Set tabs to 4.
8 
9  Postgres9 support.
10  01 Dec 2011: gherteg added support for retrieving insert IDs from tables without OIDs
11*/
12
13// security - hide paths
14if (!defined('ADODB_DIR')) die();
15
16include_once(ADODB_DIR."/drivers/adodb-postgres7.inc.php");
17
18class ADODB_postgres9 extends ADODB_postgres7 {
19        var $databaseType = 'postgres9';       
20       
21        function ADODB_postgres9()
22        {
23                $this->ADODB_postgres7();
24        }
25
26        // Don't use OIDs, as they typically won't be there, and
27        // they're not what the application wants back, anyway.
28        function _insertid($table,$column)
29        {
30                return empty($table) || empty($column)
31                        ? $this->GetOne("SELECT lastval()")
32                        : $this->GetOne("SELECT currval(pg_get_serial_sequence('$table','$column'))");
33        }
34}
35
36/*--------------------------------------------------------------------------------------
37         Class Name: Recordset
38--------------------------------------------------------------------------------------*/
39
40class ADORecordSet_postgres9 extends ADORecordSet_postgres7{
41        var $databaseType = "postgres9";
42       
43        function ADORecordSet_postgres9($queryID,$mode=false)
44        {
45                $this->ADORecordSet_postgres7($queryID,$mode);
46        }
47}
48
49class ADORecordSet_assoc_postgres9 extends ADORecordSet_postgres7{
50        var $databaseType = "postgres9";
51       
52        function ADORecordSet_assoc_postgres9($queryID,$mode=false)
53        {
54                $this->ADORecordSet_postgres7($queryID,$mode);
55        }
56}
57?>
Note: See TracBrowser for help on using the repository browser.