1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-17 19:37:13 +02:00

- removed DibiResultIterator

- DibiConnection::nativeQuery & query() returns DibiResult or NULL
- added optional parameters $offset, $limit, $simplify to DibiResult::fetchAll()
This commit is contained in:
David Grudl
2008-05-20 08:15:30 +00:00
parent 4334eaa963
commit 69876a70b7
4 changed files with 34 additions and 154 deletions

View File

@@ -226,8 +226,8 @@ class DibiConnection extends /*Nette::*/Object
/**
* Generates (translates) and executes SQL query.
*
* @param array|mixed one or more arguments
* @return DibiResult Result set object (if any)
* @param array|mixed one or more arguments
* @return DibiResult|NULL result set object (if any)
* @throws DibiException
*/
final public function query($args)
@@ -265,8 +265,8 @@ class DibiConnection extends /*Nette::*/Object
/**
* Executes the SQL query.
*
* @param string SQL statement.
* @return DibiResult Result set object (if any)
* @param string SQL statement.
* @return DibiResult|NULL result set object (if any)
* @throws DibiException
*/
final public function nativeQuery($sql)
@@ -279,7 +279,7 @@ class DibiConnection extends /*Nette::*/Object
$time = -microtime(TRUE);
dibi::notify($this, 'beforeQuery', $sql);
$res = $this->driver->query($sql) ? new DibiResult(clone $this->driver, $this->config) : TRUE; // backward compatibility - will be changed to NULL
$res = $this->driver->query($sql) ? new DibiResult(clone $this->driver, $this->config) : NULL;
$time += microtime(TRUE);
dibi::$elapsedTime = $time;