cvs: pear /MDB2/MDB2/Driver ibase.php
| From: | Lorenzo Alberton | Date: | Tue, 18 Oct 2005 21:35:22 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver ibase.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35683@lists.php.net to get a copy of this message | ||
quipo Tue Oct 18 17:35:22 2005 EDT
Modified files:
/pear/MDB2/MDB2/Driver ibase.php
Log:
getSequenceName() and quoteIdentifier() now return an uppercase string by default.
Sidenote: quoted identifiers are not supported anymore.
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/ibase.php?r1=1.114&r2=1.115&ty=u
Index: pear/MDB2/MDB2/Driver/ibase.php
diff -u pear/MDB2/MDB2/Driver/ibase.php:1.114 pear/MDB2/MDB2/Driver/ibase.php:1.115
--- pear/MDB2/MDB2/Driver/ibase.php:1.114 Mon Oct 17 07:24:47 2005
+++ pear/MDB2/MDB2/Driver/ibase.php Tue Oct 18 17:35:22 2005
@@ -43,7 +43,7 @@
// | Author: Lorenzo Alberton <l.alberton@quipo.it> |
// +----------------------------------------------------------------------+
//
-// $Id: ibase.php,v 1.114 2005/10/17 11:24:47 quipo Exp $
+// $Id: ibase.php,v 1.115 2005/10/18 21:35:22 quipo Exp $
/**
* MDB2 FireBird/InterBase driver
@@ -208,6 +208,22 @@
}
// }}}
+ // {{{ quoteIdentifier()
+
+ /**
+ * Delimited identifiers are a nightmare with InterBase, so they're disabled
+ *
+ * @param string $str identifier name to be quoted
+ * @return string quoted identifier string
+ *
+ * @access public
+ */
+ function quoteIdentifier($str)
+ {
+ return strtoupper($str);
+ }
+
+ // }}}
// {{{ getConnection()
/**
@@ -595,6 +611,21 @@
}
// }}}
+ // {{{ getSequenceName()
+
+ /**
+ * adds sequence name formatting to a sequence name
+ *
+ * @param string $sqn name of the sequence
+ * @return string formatted sequence name
+ * @access public
+ */
+ function getSequenceName($sqn)
+ {
+ return strtoupper(parent::getSequenceName($sqn));
+ }
+
+ // }}}
// {{{ nextID()
/**
@@ -610,7 +641,7 @@
function nextID($seq_name, $ondemand = true)
{
$sequence_name = $this->getSequenceName($seq_name);
- $query = 'SELECT GEN_ID('.strtoupper($sequence_name).', 1) as the_value FROM
RDB$DATABASE';
+ $query = 'SELECT GEN_ID('.$sequence_name.', 1) as the_value FROM
RDB$DATABASE';
$this->expectError('*');
$result = $this->queryOne($query, 'integer');
$this->popExpect();
@@ -648,7 +679,7 @@
function currID($seq_name)
{
$sequence_name = $this->getSequenceName($seq_name);
- $query = 'SELECT GEN_ID('.strtoupper($sequence_name).', 0) as the_value FROM
RDB$DATABASE';
+ $query = 'SELECT GEN_ID('.$sequence_name.', 0) as the_value FROM
RDB$DATABASE';
$value = @$this->queryOne($query);
if (PEAR::isError($value)) {
return $this->raiseError(MDB2_ERROR, null, null,