cvs: pear /MDB2/MDB2/Driver/Manager oci8.php pgsql.php

From: Date: Wed, 12 Oct 2005 17:19:47 +0000
Subject: cvs: pear /MDB2/MDB2/Driver/Manager oci8.php pgsql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35467@lists.php.net to get a copy of this message
lsmith Wed Oct 12 13:19:47 2005 EDT Modified files: /pear/MDB2/MDB2/Driver/Manager oci8.php pgsql.php Log: - readded _isSequenceName() usage in listSequences() http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Manager/oci8.php?r1=1.39&r2=1.40&ty=u Index: pear/MDB2/MDB2/Driver/Manager/oci8.php diff -u pear/MDB2/MDB2/Driver/Manager/oci8.php:1.39 pear/MDB2/MDB2/Driver/Manager/oci8.php:1.40 --- pear/MDB2/MDB2/Driver/Manager/oci8.php:1.39 Wed Oct 12 06:50:02 2005 +++ pear/MDB2/MDB2/Driver/Manager/oci8.php Wed Oct 12 13:19:47 2005 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ -// $Id: oci8.php,v 1.39 2005/10/12 10:50:02 lsmith Exp $ +// $Id: oci8.php,v 1.40 2005/10/12 17:19:47 lsmith Exp $ require_once 'MDB2/Driver/Manager/Common.php'; @@ -749,15 +749,19 @@ } $query = "SELECT sequence_name FROM sys.user_sequences"; - $result = $db->queryCol($query); - if (PEAR::isError($result)) { - return $result; + $table_names = $db->queryCol($query); + if (PEAR::isError($table_names)) { + return $table_names; + } + $result = array(); + for ($i = 0, $j = count($table_names); $i < $j; ++$i) { + if ($sqn = $this->_isSequenceName($table_names[$i])) + $result[] = $sqn; } - if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE - && $db->options['field_case'] == CASE_LOWER - ) { + if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { $result = array_map(($db->options['field_case'] == CASE_LOWER ? 'strtolower' : 'strtoupper'), $result); } return $result; - }} + } +} ?> \ No newline at end of file http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Manager/pgsql.php?r1=1.29&r2=1.30&ty=u Index: pear/MDB2/MDB2/Driver/Manager/pgsql.php diff -u pear/MDB2/MDB2/Driver/Manager/pgsql.php:1.29 pear/MDB2/MDB2/Driver/Manager/pgsql.php:1.30 --- pear/MDB2/MDB2/Driver/Manager/pgsql.php:1.29 Wed Oct 12 06:50:02 2005 +++ pear/MDB2/MDB2/Driver/Manager/pgsql.php Wed Oct 12 13:19:47 2005 @@ -42,7 +42,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.29 2005/10/12 10:50:02 lsmith Exp $ +// $Id: pgsql.php,v 1.30 2005/10/12 17:19:47 lsmith Exp $ require_once 'MDB2/Driver/Manager/Common.php'; @@ -595,9 +595,14 @@ $query = "SELECT relname FROM pg_class WHERE relkind = 'S' AND relnamespace IN"; $query.= "(SELECT oid FROM pg_namespace WHERE nspname NOT LIKE 'pg_%' AND nspname != 'information_schema')"; - $result = $db->queryCol($query); - if (PEAR::isError($result)) { - return $result; + $table_names = $db->queryCol($query); + if (PEAR::isError($table_names)) { + return $table_names; + } + $result = array(); + for ($i = 0, $j = count($table_names); $i < $j; ++$i) { + if ($sqn = $this->_isSequenceName($table_names[$i])) + $result[] = $sqn; } if ($db->options['portability'] & MDB2_PORTABILITY_FIX_CASE) { $result = array_map(($db->options['field_case'] == CASE_LOWER ? 'strtolower' : 'strtoupper'), $result);

« previous php.pear.cvs (#35467) next »