mirror of
https://github.com/dg/dibi.git
synced 2025-08-30 17:29:53 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
17df4d17fb | ||
|
51adcd98e0 | ||
|
aaa5abd4b6 | ||
|
e4acc4a2c8 |
@@ -39,8 +39,8 @@ class dibi
|
||||
FIELD_TIME = self::TIME;
|
||||
|
||||
/** version */
|
||||
const VERSION = '2.2.4',
|
||||
REVISION = 'released on 2015-10-22';
|
||||
const VERSION = '2.2.5',
|
||||
REVISION = 'released on 2015-10-26';
|
||||
|
||||
/** sorting order */
|
||||
const ASC = 'ASC',
|
||||
|
@@ -188,6 +188,7 @@ class DibiFluent extends DibiObject implements IDataSource
|
||||
|
||||
foreach ($args as $arg) {
|
||||
if ($arg instanceof self) {
|
||||
$this->cursor[] = '%SQL';
|
||||
$arg = "($arg)";
|
||||
}
|
||||
$this->cursor[] = $arg;
|
||||
@@ -316,12 +317,11 @@ class DibiFluent extends DibiObject implements IDataSource
|
||||
*/
|
||||
public function fetch()
|
||||
{
|
||||
if ($this->command === 'SELECT' && !$this->clauses['LIMIT']) {
|
||||
$result = $this->query($this->limit(1)->_export())->fetch();
|
||||
$this->removeClause('LIMIT');
|
||||
return $result;
|
||||
if ($this->command === 'SELECT' && !$this->clauses['LIMIT'] && !$this->clauses['OFFSET']) {
|
||||
return $this->query($this->_export(NULL, array('%lmt', 1)))->fetch();
|
||||
} else {
|
||||
return $this->query($this->_export())->fetch();
|
||||
}
|
||||
return $this->query($this->_export())->fetch();
|
||||
}
|
||||
|
||||
|
||||
@@ -331,12 +331,11 @@ class DibiFluent extends DibiObject implements IDataSource
|
||||
*/
|
||||
public function fetchSingle()
|
||||
{
|
||||
if ($this->command === 'SELECT' && !$this->clauses['LIMIT']) {
|
||||
$result = $this->query($this->limit(1)->_export())->fetchSingle();
|
||||
$this->removeClause('LIMIT');
|
||||
return $result;
|
||||
if ($this->command === 'SELECT' && !$this->clauses['LIMIT'] && !$this->clauses['OFFSET']) {
|
||||
return $this->query($this->_export(NULL, array('%lmt', 1)))->fetchSingle();
|
||||
} else {
|
||||
return $this->query($this->_export())->fetchSingle();
|
||||
}
|
||||
return $this->query($this->_export())->fetchSingle();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -588,7 +588,7 @@ final class DibiTranslator extends DibiObject
|
||||
return $matches[9] == '' ? $this->formatValue($m, FALSE) : $m . $matches[9]; // value or identifier
|
||||
}
|
||||
|
||||
die('this should be never executed');
|
||||
throw new Exception('this should be never executed');
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1 +0,0 @@
|
||||
Dibi 2.2.3 (released on 2015-01-13)
|
Reference in New Issue
Block a user