1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-30 01:09:50 +02:00

Compare commits

...

3 Commits
v2.0.4 ... v2.0

Author SHA1 Message Date
David Grudl
697ffcd44a released 2.0.5
This release marks the end of life of  2.0 series.
2015-01-13 05:52:56 +01:00
Pavel Zelezny
4535bc5458 Oracle use double quotes for escaping 2015-01-13 05:51:44 +01:00
Rossler Jan
bf36cf96ee PostgreSQL: fixed identifier escaping in reflection. 2015-01-13 05:51:43 +01:00
4 changed files with 7 additions and 7 deletions

View File

@@ -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',

View File

@@ -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) . ']';

View File

@@ -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

View File

@@ -1 +1 @@
Dibi 2.0.4 (revision $WCREV$ released on $WCDATE$)
Dibi 2.0.5 (released on 2015-01-13)