mirror of
https://github.com/dg/dibi.git
synced 2025-09-01 18:12:51 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cd7362efa6 | ||
|
fa342fd240 | ||
|
2277896109 | ||
|
f9c9003fc1 |
@@ -71,8 +71,8 @@ class dibi
|
||||
FIELD_TIME = dibi::TIME;
|
||||
|
||||
/** version */
|
||||
const VERSION = '2.1.2',
|
||||
REVISION = '$WCREV$ released on $WCDATE$';
|
||||
const VERSION = '2.1.3',
|
||||
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) . ']';
|
||||
|
||||
|
@@ -482,7 +482,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
|
||||
@@ -522,7 +522,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
|
||||
@@ -563,7 +563,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
|
||||
|
@@ -514,7 +514,7 @@ class DibiResult extends DibiObject implements IDataSource
|
||||
$row[$key] = is_float($tmp = $value * 1) ? $value : $tmp;
|
||||
|
||||
} elseif ($type === dibi::FLOAT) {
|
||||
$row[$key] = ltrim((string) ($tmp = (float) $value), '0') === ltrim(rtrim(rtrim($value, '0'), '.'), '0') ? $tmp : $value;
|
||||
$row[$key] = str_replace(',', '.', ltrim((string) ($tmp = (float) $value), '0')) === ltrim(rtrim(rtrim($value, '0'), '.'), '0') ? $tmp : $value;
|
||||
|
||||
} elseif ($type === dibi::BOOL) {
|
||||
$row[$key] = ((bool) $value) && $value !== 'f' && $value !== 'F';
|
||||
|
@@ -2,7 +2,7 @@ body {
|
||||
font: 15px/1.5 Tahoma, Verdana, Myriad Web, Syntax, sans-serif;
|
||||
color: #333;
|
||||
background: #fff url('dibi-powered.gif') no-repeat 99% 1em;
|
||||
margin: 1.6em;
|
||||
margin: 1.6em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
Dibi 2.1.2 (revision $WCREV$ released on $WCDATE$)
|
||||
Dibi 2.1.3 (released on 2015-01-13)
|
||||
|
Reference in New Issue
Block a user