mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
(fix): replace deprecated Query::contains() with Query::containsAny()
Query::contains() is deprecated for array attributes in the new query library. The deprecation warnings were spamming worker logs and potentially slowing attribute processing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3f7261167b
commit
080361338c
@@ -605,7 +605,7 @@ class Databases extends Action
|
||||
Query::equal('databaseInternalId', [$databaseInternalId]),
|
||||
Query::equal('type', [ColumnType::Relationship->value]),
|
||||
Query::notEqual('collectionInternalId', $collectionInternalId),
|
||||
Query::contains('options', ['"relatedCollection":"'. $collectionId .'"']),
|
||||
Query::containsAny('options', ['"relatedCollection":"'. $collectionId .'"']),
|
||||
],
|
||||
$dbForProject,
|
||||
function ($attribute) use ($dbForProject, $databaseInternalId) {
|
||||
|
||||
@@ -92,7 +92,7 @@ class Delete extends Action
|
||||
$ownersCount = $dbForProject->count(
|
||||
collection: 'memberships',
|
||||
queries: [
|
||||
Query::contains('roles', ['owner']),
|
||||
Query::containsAny('roles', ['owner']),
|
||||
Query::equal('teamInternalId', [$team->getSequence()])
|
||||
],
|
||||
max: 2
|
||||
|
||||
@@ -92,7 +92,7 @@ class Update extends Action
|
||||
$ownersCount = $dbForProject->count(
|
||||
collection: 'memberships',
|
||||
queries: [
|
||||
Query::contains('roles', ['owner']),
|
||||
Query::containsAny('roles', ['owner']),
|
||||
Query::equal('teamInternalId', [$team->getSequence()])
|
||||
],
|
||||
max: 2
|
||||
|
||||
@@ -122,7 +122,7 @@ class Functions extends Action
|
||||
while ($sum >= $limit) {
|
||||
$functions = $dbForProject->find('functions', [
|
||||
Query::select(['$id', 'events']), // Skip variables subqueries
|
||||
Query::contains('events', $events),
|
||||
Query::containsAny('events', $events),
|
||||
Query::limit($limit),
|
||||
Query::offset($offset),
|
||||
Query::orderAsc('$sequence'),
|
||||
|
||||
Reference in New Issue
Block a user