From add6a60af47572423ee3b538edf96f49eddb5996 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 14 Oct 2024 14:33:53 +1300 Subject: [PATCH] Remove redundant files --- app/init.php | 2 -- src/Appwrite/Utopia/Database/Database.php | 42 ----------------------- src/Appwrite/Utopia/Database/Mirror.php | 16 --------- 3 files changed, 60 deletions(-) delete mode 100644 src/Appwrite/Utopia/Database/Database.php delete mode 100644 src/Appwrite/Utopia/Database/Mirror.php diff --git a/app/init.php b/app/init.php index 913f26efba..ff6ccd8d35 100644 --- a/app/init.php +++ b/app/init.php @@ -285,8 +285,6 @@ const METRIC_NETWORK_REQUESTS = 'network.requests'; const METRIC_NETWORK_INBOUND = 'network.inbound'; const METRIC_NETWORK_OUTBOUND = 'network.outbound'; -const METRIC_MESSAGES = 'messages'; - $register = new Registry(); App::setMode(System::getEnv('_APP_ENV', App::MODE_TYPE_PRODUCTION)); diff --git a/src/Appwrite/Utopia/Database/Database.php b/src/Appwrite/Utopia/Database/Database.php deleted file mode 100644 index 3e0a59b394..0000000000 --- a/src/Appwrite/Utopia/Database/Database.php +++ /dev/null @@ -1,42 +0,0 @@ -getMethod() === Query::TYPE_SEARCH || $query->getMethod() === Query::TYPE_EQUAL) { - $attribute = $query->getAttribute(); - - if ($collectionCache === null) { - $collectionCache = $this->silent(fn () => $this->getCollection($collection)); - } - - $attributeMetadata = null; - foreach ($collectionCache->getAttribute('attributes', []) as $attributeDocument) { - if ($attributeDocument->getId() === $attribute) { - $attributeMetadata = $attributeDocument; - break; - } - } - - if ($attributeMetadata !== null) { - if ($attributeMetadata->getAttribute('array', false) === true) { - $query->setMethod(Query::TYPE_CONTAINS); - } - } - } - } - } catch (\Throwable $err) { - // Ignore error, to not do any harm - } - - return parent::find($collection, $queries); - } -} diff --git a/src/Appwrite/Utopia/Database/Mirror.php b/src/Appwrite/Utopia/Database/Mirror.php deleted file mode 100644 index 2ad1665958..0000000000 --- a/src/Appwrite/Utopia/Database/Mirror.php +++ /dev/null @@ -1,16 +0,0 @@ -