mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Add missing bulk cases on commit
This commit is contained in:
@@ -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