mirror of
https://github.com/dg/dibi.git
synced 2025-08-30 01:09:50 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
697ffcd44a | ||
|
4535bc5458 | ||
|
bf36cf96ee |
@@ -71,8 +71,8 @@ class dibi
|
||||
FIELD_TIME = dibi::TIME;
|
||||
|
||||
/** version */
|
||||
const VERSION = '2.0.4',
|
||||
REVISION = '$WCREV$ released on $WCDATE$';
|
||||
const VERSION = '2.0.5',
|
||||
REVISION = 'released on 2015-01-13';
|
||||
|
||||
/** sorting order */
|
||||
const ASC = 'ASC',
|
||||
|
@@ -255,6 +255,7 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
case 'mysql':
|
||||
return '`' . str_replace('`', '``', $value) . '`';
|
||||
|
||||
case 'oci':
|
||||
case 'pgsql':
|
||||
return '"' . str_replace('"', '""', $value) . '"';
|
||||
|
||||
@@ -263,7 +264,6 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
||||
return '[' . strtr($value, '[]', ' ') . ']';
|
||||
|
||||
case 'odbc':
|
||||
case 'oci': // TODO: not tested
|
||||
case 'mssql':
|
||||
return '[' . str_replace(array('[', ']'), array('[[', ']]'), $value) . ']';
|
||||
|
||||
|
@@ -480,7 +480,7 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiResultDr
|
||||
*/
|
||||
public function getColumns($table)
|
||||
{
|
||||
$_table = $this->escape($table, dibi::TEXT);
|
||||
$_table = $this->escape($this->escape($table, dibi::IDENTIFIER), dibi::TEXT);
|
||||
$res = $this->query("
|
||||
SELECT indkey
|
||||
FROM pg_class
|
||||
@@ -520,7 +520,7 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiResultDr
|
||||
*/
|
||||
public function getIndexes($table)
|
||||
{
|
||||
$_table = $this->escape($table, dibi::TEXT);
|
||||
$_table = $this->escape($this->escape($table, dibi::IDENTIFIER), dibi::TEXT);
|
||||
$res = $this->query("
|
||||
SELECT ordinal_position, column_name
|
||||
FROM information_schema.columns
|
||||
@@ -561,7 +561,7 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiResultDr
|
||||
*/
|
||||
public function getForeignKeys($table)
|
||||
{
|
||||
$_table = $this->escape($table, dibi::TEXT);
|
||||
$_table = $this->escape($this->escape($table, dibi::IDENTIFIER), dibi::TEXT);
|
||||
|
||||
$res = $this->query("
|
||||
SELECT
|
||||
|
@@ -1 +1 @@
|
||||
Dibi 2.0.4 (revision $WCREV$ released on $WCDATE$)
|
||||
Dibi 2.0.5 (released on 2015-01-13)
|
||||
|
Reference in New Issue
Block a user