Fix bulk logged queries

This commit is contained in:
Jake Barnby
2025-09-06 02:37:17 +12:00
parent f4bf1756c9
commit 391942ba72
3 changed files with 1603 additions and 28 deletions
@@ -104,6 +104,8 @@ class Delete extends Action
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Bulk delete is not supported for ' . $this->getSdkNamespace() . ' with relationship attributes');
}
$originalQueries = $queries;
try {
$queries = Query::parseQueries($queries);
} catch (QueryException $e) {
@@ -135,7 +137,7 @@ class Delete extends Action
'transactionInternalId' => $transaction->getSequence(),
'action' => 'bulkDelete',
'data' => [
'queries' => $queries,
'queries' => $originalQueries,
],
]);
@@ -116,13 +116,15 @@ class Update extends Action
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Bulk update is not supported for ' . $this->getSdkNamespace() . ' with relationship attributes');
}
$originalQueries = $queries;
try {
$queries = Query::parseQueries($queries);
} catch (QueryException $e) {
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
if ($data['$permissions']) {
if (isset($data['$permissions'])) {
$validator = new Permissions();
if (!$validator->isValid($data['$permissions'])) {
throw new Exception(Exception::GENERAL_BAD_REQUEST, $validator->getDescription());
@@ -157,7 +159,7 @@ class Update extends Action
'action' => 'bulkUpdate',
'data' => [
'data' => $data,
'queries' => $queries,
'queries' => $originalQueries,
],
]);
@@ -167,7 +169,6 @@ class Update extends Action
'transactions',
$transactionId,
'operations',
1
);
});
File diff suppressed because it is too large Load Diff