mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Remove redundant files
This commit is contained in:
parent
4543c182b5
commit
add6a60af4
3 changed files with 0 additions and 60 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Database;
|
||||
|
||||
use Utopia\Database\Database as UtopiaDatabase;
|
||||
|
||||
class Database extends UtopiaDatabase
|
||||
{
|
||||
public function find(string $collection, array $queries = []): array
|
||||
{
|
||||
try {
|
||||
$collectionCache = null;
|
||||
foreach ($queries as $query) {
|
||||
if ($query->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);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Database;
|
||||
|
||||
use Utopia\Database\Mirror as UtopiaMirror;
|
||||
|
||||
class Mirror extends UtopiaMirror
|
||||
{
|
||||
public function __construct(
|
||||
Database $source,
|
||||
?Database $destination = null,
|
||||
array $filters = [],
|
||||
) {
|
||||
parent::__construct($source, $destination, $filters);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue