mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Replace databasesBatchSize with databasesTransactionSize in database operations
Co-authored-by: jakeb994 <jakeb994@gmail.com>
This commit is contained in:
+1
-1
@@ -105,7 +105,7 @@ class Decrement extends Action
|
||||
}
|
||||
|
||||
// Enforce max operations per transaction
|
||||
$maxBatch = $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH;
|
||||
$maxBatch = $plan['databasesTransactionSize'] ?? APP_LIMIT_DATABASE_TRANSACTION;
|
||||
$existing = $transaction->getAttribute('operations', 0);
|
||||
if (($existing + 1) > $maxBatch) {
|
||||
throw new Exception(
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ class Increment extends Action
|
||||
}
|
||||
|
||||
// Enforce max operations per transaction
|
||||
$maxBatch = $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH;
|
||||
$maxBatch = $plan['databasesTransactionSize'] ?? APP_LIMIT_DATABASE_TRANSACTION;
|
||||
$existing = $transaction->getAttribute('operations', 0);
|
||||
if (($existing + 1) > $maxBatch) {
|
||||
throw new Exception(
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ class Delete extends Action
|
||||
}
|
||||
|
||||
// Enforce max operations per transaction
|
||||
$maxBatch = $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH;
|
||||
$maxBatch = $plan['databasesTransactionSize'] ?? APP_LIMIT_DATABASE_TRANSACTION;
|
||||
$existing = $transaction->getAttribute('operations', 0);
|
||||
if (($existing + 1) > $maxBatch) {
|
||||
throw new Exception(
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ class Update extends Action
|
||||
}
|
||||
|
||||
// Enforce max operations per transaction
|
||||
$maxBatch = $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH;
|
||||
$maxBatch = $plan['databasesTransactionSize'] ?? APP_LIMIT_DATABASE_TRANSACTION;
|
||||
$existing = $transaction->getAttribute('operations', 0);
|
||||
if (($existing + 1) > $maxBatch) {
|
||||
throw new Exception(
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ class Upsert extends Action
|
||||
}
|
||||
|
||||
// Enforce max operations per transaction
|
||||
$maxBatch = $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH;
|
||||
$maxBatch = $plan['databasesTransactionSize'] ?? APP_LIMIT_DATABASE_TRANSACTION;
|
||||
$existing = $transaction->getAttribute('operations', 0);
|
||||
if (($existing + \count($documents)) > $maxBatch) {
|
||||
throw new Exception(
|
||||
|
||||
+1
-1
@@ -198,7 +198,7 @@ class Create extends Action
|
||||
}
|
||||
|
||||
// Enforce max operations per transaction
|
||||
$maxBatch = $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH;
|
||||
$maxBatch = $plan['databasesTransactionSize'] ?? APP_LIMIT_DATABASE_TRANSACTION;
|
||||
$existing = $transaction->getAttribute('operations', 0);
|
||||
if (($existing + \count($documents)) > $maxBatch) {
|
||||
throw new Exception(
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ class Delete extends Action
|
||||
}
|
||||
|
||||
// Enforce max operations per transaction
|
||||
$maxBatch = $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH;
|
||||
$maxBatch = $plan['databasesTransactionSize'] ?? APP_LIMIT_DATABASE_TRANSACTION;
|
||||
$existing = $transaction->getAttribute('operations', 0);
|
||||
if (($existing + 1) > $maxBatch) {
|
||||
throw new Exception(
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@ class Update extends Action
|
||||
}
|
||||
|
||||
// Enforce max operations per transaction
|
||||
$maxBatch = $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH;
|
||||
$maxBatch = $plan['databasesTransactionSize'] ?? APP_LIMIT_DATABASE_TRANSACTION;
|
||||
$existing = $transaction->getAttribute('operations', 0);
|
||||
if (($existing + 1) > $maxBatch) {
|
||||
throw new Exception(
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ class Upsert extends Action
|
||||
}
|
||||
|
||||
// Enforce max operations per transaction
|
||||
$maxBatch = $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH;
|
||||
$maxBatch = $plan['databasesTransactionSize'] ?? APP_LIMIT_DATABASE_TRANSACTION;
|
||||
$existing = $transaction->getAttribute('operations', 0);
|
||||
if (($existing + 1) > $maxBatch) {
|
||||
throw new Exception(
|
||||
|
||||
@@ -67,7 +67,7 @@ class AddOperations extends Action
|
||||
throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Invalid or non‑pending transaction');
|
||||
}
|
||||
|
||||
$maxBatch = $plan['databasesBatchSize'] ?? APP_LIMIT_DATABASE_BATCH;
|
||||
$maxBatch = $plan['databasesTransactionSize'] ?? APP_LIMIT_DATABASE_TRANSACTION;
|
||||
$existing = $transaction->getAttribute('operations', 0);
|
||||
|
||||
if (($existing + \count($operations)) > $maxBatch) {
|
||||
|
||||
Reference in New Issue
Block a user