diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2024-10-16 10:41:21 +0200 |
---|---|---|
committer | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2024-10-16 18:30:53 +0200 |
commit | 70db9dc5369142526f74a4aa39e2a9ba92af9d8e (patch) | |
tree | ef58139898ff8f1c421fbfb8674877a8f2f59bcc /lib/private/Files/Cache/StorageGlobal.php | |
parent | 94e1241c589e13464a958b29052739a354aadddd (diff) | |
download | nextcloud-server-dbQueriesExecStmt.tar.gz nextcloud-server-dbQueriesExecStmt.zip |
chore(db): Correctly apply query typesdbQueriesExecStmt
fix: psalm
fix: error
fix: add batch
fix: fatal error
fix: add batch
chore: add batch
chore: add batch
fix: psalm
fix: typo
fix: psalm
fix: return bool
fix: revert Manager
Diffstat (limited to 'lib/private/Files/Cache/StorageGlobal.php')
-rw-r--r-- | lib/private/Files/Cache/StorageGlobal.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/private/Files/Cache/StorageGlobal.php b/lib/private/Files/Cache/StorageGlobal.php index b55c0fcdb91..bab31b1db91 100644 --- a/lib/private/Files/Cache/StorageGlobal.php +++ b/lib/private/Files/Cache/StorageGlobal.php @@ -21,16 +21,14 @@ use OCP\IDBConnection; * @package OC\Files\Cache */ class StorageGlobal { - /** @var IDBConnection */ - private $connection; - /** @var array<string, array> */ private $cache = []; /** @var array<int, array> */ private $numericIdCache = []; - public function __construct(IDBConnection $connection) { - $this->connection = $connection; + public function __construct( + private IDBConnection $connection, + ) { } /** @@ -42,7 +40,7 @@ class StorageGlobal { ->from('storages') ->where($builder->expr()->in('id', $builder->createNamedParameter(array_values($storageIds), IQueryBuilder::PARAM_STR_ARRAY))); - $result = $query->execute(); + $result = $query->executeQuery(); while ($row = $result->fetch()) { $this->cache[$row['id']] = $row; } @@ -60,7 +58,7 @@ class StorageGlobal { ->from('storages') ->where($builder->expr()->eq('id', $builder->createNamedParameter($storageId))); - $result = $query->execute(); + $result = $query->executeQuery(); $row = $result->fetch(); $result->closeCursor(); @@ -83,7 +81,7 @@ class StorageGlobal { ->from('storages') ->where($builder->expr()->eq('numeric_id', $builder->createNamedParameter($numericId))); - $result = $query->execute(); + $result = $query->executeQuery(); $row = $result->fetch(); $result->closeCursor(); |