From b7834a3373d386a44f2f94c631d2d5b48463d44e Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 25 Apr 2007 06:44:38 +0000 Subject: [PATCH] --- dibi/dibi.php | 21 ++++++++++++++++++--- dibi/libs/driver.php | 2 -- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/dibi/dibi.php b/dibi/dibi.php index 9ef7f66..285dbdc 100644 --- a/dibi/dibi.php +++ b/dibi/dibi.php @@ -232,7 +232,7 @@ class dibi /** - * Generates and executes SQL query + * Generates and executes SQL query - Monostate for DibiDriver::query() * * @param array|mixed one or more arguments * @return int|DibiResult @@ -276,9 +276,10 @@ class dibi /** + * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query * Monostate for DibiDriver::insertId() * - * @return int + * @return int|bool int on success or FALSE on failure */ static public function insertId() { @@ -288,9 +289,10 @@ class dibi /** + * Gets the number of affected rows * Monostate for DibiDriver::affectedRows() * - * @return int + * @return int number of rows or FALSE on error */ static public function affectedRows() { @@ -299,6 +301,19 @@ class dibi + /** + * Executes the SQL query - Monostate for DibiDriver::nativeQuery() + * + * @param string SQL statement. + * @return object|bool Result set object or TRUE on success, FALSE on failure + */ + static public function nativeQuery($sql); + { + return self::getConnection()->nativeQuery($sql); + } + + + static private function dumpHighlight($matches) { if (!empty($matches[1])) // comment diff --git a/dibi/libs/driver.php b/dibi/libs/driver.php index a62f123..be320c5 100644 --- a/dibi/libs/driver.php +++ b/dibi/libs/driver.php @@ -157,7 +157,6 @@ abstract class DibiDriver /** * Executes the SQL query - * * @param string SQL statement. * @return object|bool Result set object or TRUE on success, FALSE on failure */ @@ -167,7 +166,6 @@ abstract class DibiDriver /** * Gets the number of affected rows by the last INSERT, UPDATE or DELETE query - * * @return int number of rows or FALSE on error */ abstract public function affectedRows();