mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 08:28:42 +00:00
Add missing bulk cases on commit
This commit is contained in:
parent
3a7d8d2296
commit
d6544f412d
1 changed files with 18 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue