X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fdatabase%2Fclass_BaseDatabaseWrapper.php;h=e925f38607e4ca88e9d0bd64d433420ecd7502dc;hp=c26f945ebee31fc7589cf33695ad81b25e023c8e;hb=3cfc834fbd3fae00c5edc65033c0f043fc4186a2;hpb=d511c5d7ad0170ee4c593fd2a0f50c738cce375a diff --git a/inc/classes/main/database/class_BaseDatabaseWrapper.php b/inc/classes/main/database/class_BaseDatabaseWrapper.php index c26f945e..e925f386 100644 --- a/inc/classes/main/database/class_BaseDatabaseWrapper.php +++ b/inc/classes/main/database/class_BaseDatabaseWrapper.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -81,7 +81,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem { * @param $onlyKeys Only use these keys for a cache key * @return void */ - protected function queryInsertDataSet (StoreableCriteria $dataSetInstance, $onlyKeys = array()) { + protected function queryInsertDataSet (StoreableCriteria $dataSetInstance, array $onlyKeys = array()) { // First get a key suitable for our cache and extend it with this class name $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys); //* DEBUG: */ $this->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...'); @@ -103,7 +103,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem { * @param $onlyKeys Only use these keys for a cache key * @return void */ - protected function queryUpdateDataSet (StoreableCriteria $dataSetInstance, $onlyKeys = array()) { + protected function queryUpdateDataSet (StoreableCriteria $dataSetInstance, array $onlyKeys = array()) { // First get a key suitable for our cache and extend it with this class name $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys); //* DEBUG: */ $this->debugOutput('BASE-WRAPPER: Using cache key ' . $cacheKey . ' for purging ...'); @@ -127,6 +127,15 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem { return $this->getDatabaseInstance()->getIndexKey(); } + /** + * Getter for last exception + * + * @return $lastException Last exception or NULL if none occured + */ + public final function getLastException () { + return $this->getDatabaseInstance()->getLastException(); + } + /** * Do a "select" query on the current table with the given search criteria and * store it in cache for later usage @@ -135,7 +144,7 @@ class BaseDatabaseWrapper extends BaseFrameworkSystem { * @param $onlyKeys Only use these keys for a cache key * @return $resultInstance An instance of a database result class */ - public function doSelectByCriteria (Criteria $criteriaInstance, $onlyKeys = array()) { + public function doSelectByCriteria (Criteria $criteriaInstance, array $onlyKeys = array()) { // First get a key suitable for our cache and extend it with this class name $cacheKey = $this->getCacheKeyByCriteria($criteriaInstance, $onlyKeys);