diff options
author | Frank Karlitschek <frank@owncloud.org> | 2013-12-23 03:38:56 -0800 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2013-12-23 03:38:56 -0800 |
commit | 7b428f6009f61bad0f1ab49a83fefdd3ff2d2ce6 (patch) | |
tree | 80fbde8b9c43c5162bda2bac6b6a060bab071658 /lib | |
parent | f60ecfc7fd127b412f0aa5134ae2e6d976997ad9 (diff) | |
parent | 4bc2a22317dd65f142cf697cd10ed6920d930544 (diff) | |
download | nextcloud-server-7b428f6009f61bad0f1ab49a83fefdd3ff2d2ce6.tar.gz nextcloud-server-7b428f6009f61bad0f1ab49a83fefdd3ff2d2ce6.zip |
Merge pull request #6460 from owncloud/remove-numRows
Remove OC_DB_StatementWrapper::numRows()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/db/statementwrapper.php | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/private/db/statementwrapper.php b/lib/private/db/statementwrapper.php index b8da1afc0e5..5e89261d936 100644 --- a/lib/private/db/statementwrapper.php +++ b/lib/private/db/statementwrapper.php @@ -30,25 +30,6 @@ class OC_DB_StatementWrapper { } /** - * provide numRows - */ - public function numRows() { - $type = OC_Config::getValue( "dbtype", "sqlite" ); - if ($type == 'oci') { - // OCI doesn't have a queryString, just do a rowCount for now - return $this->statement->rowCount(); - } - $regex = '/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i'; - $queryString = $this->statement->getWrappedStatement()->queryString; - if (preg_match($regex, $queryString, $output) > 0) { - $query = OC_DB::prepare("SELECT COUNT(*) FROM {$output[1]}"); - return $query->execute($this->lastArguments)->fetchColumn(); - }else{ - return $this->statement->rowCount(); - } - } - - /** * make execute return the result instead of a bool */ public function execute($input=array()) { |