mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Add missing bulk cases on commit
This commit is contained in:
1 file changed
+18
-2
@@ -152,14 +152,30 @@ class Update extends Action
|
||||
min: $data['min'] ?? null
|
||||
);
|
||||
break;
|
||||
|
||||
|
||||
case 'bulkCreate':
|
||||
$documents = [];
|
||||
foreach ($data as $docData) {
|
||||
$documents[] = new Document($docData);
|
||||
}
|
||||
$dbForProject->createDocuments($collectionId, $documents);
|
||||
break;
|
||||
|
||||
case 'bulkUpdate':
|
||||
$dbForProject->updateDocuments(
|
||||
$collectionName,
|
||||
$collectionId,
|
||||
$data['data'] ?? null,
|
||||
$data['queries'] ?? []
|
||||
);
|
||||
break;
|
||||
|
||||
case 'bulkUpsert':
|
||||
$documents = [];
|
||||
foreach ($data as $docData) {
|
||||
$documents[] = new Document($docData);
|
||||
}
|
||||
$dbForProject->createOrUpdateDocuments($collectionId, $documents);
|
||||
break;
|
||||
|
||||
case 'bulkDelete':
|
||||
$dbForProject->deleteDocuments(
|
||||
|
||||
Reference in new issue
Block a user