mirror of
https://github.com/nextcloud/server.git
synced 2026-03-27 04:43:20 -04:00
OCI doesn't have a queryString
This commit is contained in:
parent
6300b95896
commit
159efa8bd4
1 changed files with 5 additions and 0 deletions
|
|
@ -733,6 +733,11 @@ class DoctrineStatementWrapper {
|
|||
* 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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue