diff options
author | Robin Appelman <robin@icewind.nl> | 2024-08-15 18:04:55 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2024-08-28 10:27:14 +0200 |
commit | b21a399d1a7fab83ff80bc637c176915d3460f2b (patch) | |
tree | 19bd20b2640275d01401a4c093aad1ae6b736b78 /apps/files/tests | |
parent | cc091b150eb370f16d3c7a076d912b08878af96e (diff) | |
download | nextcloud-server-b21a399d1a7fab83ff80bc637c176915d3460f2b.tar.gz nextcloud-server-b21a399d1a7fab83ff80bc637c176915d3460f2b.zip |
fix: implement sharding compatible cleanup for various bits
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/Command/DeleteOrphanedFilesTest.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/files/tests/Command/DeleteOrphanedFilesTest.php b/apps/files/tests/Command/DeleteOrphanedFilesTest.php index e52f9e1e130..ed9a1866d26 100644 --- a/apps/files/tests/Command/DeleteOrphanedFilesTest.php +++ b/apps/files/tests/Command/DeleteOrphanedFilesTest.php @@ -64,13 +64,19 @@ class DeleteOrphanedFilesTest extends TestCase { } protected function getFile($fileId) { - $stmt = $this->connection->executeQuery('SELECT * FROM `*PREFIX*filecache` WHERE `fileid` = ?', [$fileId]); - return $stmt->fetchAll(); + $query = $this->connection->getQueryBuilder(); + $query->select('*') + ->from('filecache') + ->where($query->expr()->eq('fileid', $query->createNamedParameter($fileId))); + return $query->executeQuery()->fetchAll(); } protected function getMounts($storageId) { - $stmt = $this->connection->executeQuery('SELECT * FROM `*PREFIX*mounts` WHERE `storage_id` = ?', [$storageId]); - return $stmt->fetchAll(); + $query = $this->connection->getQueryBuilder(); + $query->select('*') + ->from('mounts') + ->where($query->expr()->eq('storage_id', $query->createNamedParameter($storageId))); + return $query->executeQuery()->fetchAll(); } /** |