Repository navigation
fix(databases): name the bound an increment or decrement reached, from the column or the request - #14593
Conversation
…m the column or the request
utopia-php/database 8.3.5 holds an increment or decrement to the column's own
min and max and throws Limit when only that bound applies. The message was
built from the request's max or min, so with none given it read "has reached
the maximum value of " with no number. It now names the bound actually
reached: the request's, floored or ceiled on an integer column as the
library does, or the column's when that is tighter or the only one, and the
field ("Column" or "Attribute") instead of the SDK namespace.
Bumps utopia-php/database to 8.3.5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review complete. No issues found — approved ✅. This PR replaces fixed increment/decrement range messages with ones reporting the column's actual min/max bound, adding
No findings survived verification at the required confidence threshold. Reviewed commit: 38a04dc |
Security rulesNo new WARNING or ERROR findings from security rules. 19 existing findings tracked in
|
🟢 Tier S · Ready to merge
This PR updates the Latest changes: The newest commits normalize stored BigInteger types when detecting integer columns and add an E2E case for rounding a fractional request bound on BigInteger.
📂 Walkthrough · 6
Merged |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
…olumn A big integer column is stored with the type bigint, which the integer check compared against biginteger, so a fractional request bound on one was reported as given (8.5) instead of the whole bound the database applies (8). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php # src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Decrement.php # src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Attribute/Increment.php
What
This bumps utopia-php/database to 8.3.5. 8.3.5 includes #1036 (exact double binds and reads) and #1037, which holds an increment or decrement to the column's own
min/maxand throwsException\Limit.With 8.3.5, an increment that only the column bound stops answers 400
column_limit_exceededwith:There is no number, because the message was built from the request's empty
max/min.Fix
Increment.php/Decrement.phpnow name the bound actually reached. Two new helpers in the documentsAction,getReachedMaximum()/getReachedMinimum(), pick between the two candidates:formatOptionsbound.They return the tighter of the two, or whichever one exists. The message also names the field (
Column "b"orAttribute "b") instead of the SDK namespace. #14582 changes the same line for the wording; whichever lands second takes this version.Tests
maincode + 8.3.5testIncrementAndDecrementPastTheColumnRangeNameTheColumnBound: columnbmin 0, max 10, value 5; +6 with no max; −8 with no min; +4 with max 8; +6 with max 20; bigint column +4 with max 8.5tablesDB "b" has reached the maximum value ofColumn "b" has reached the maximum value of 10/minimum value of 0/8/10; bigint8; row unchangedThe fix is in the HTTP action, so the E2E is the fixing-layer test. It runs for TablesDB and Legacy; DocumentsDB skips it because it has no columns.
8.3.5 changes float binding, so I also ran the full database E2E suites locally on 8.3.5 (Postgres for TablesDB, Legacy and VectorsDB; Mongo for DocumentsDB):
TablesDBCustomServerTestTablesDBCustomClientTestDatabasesNumericTypesTestLegacyCustomServerTestDocumentsDBCustomServerTestTablesDBTransactionsCustomServerTesttestCommitEventPayloadCarriesSurfaceIds, which fails the same way onmainin my local stack (webhook delivery)VectorsDB/DatabasesCustomServerTest_APP_EMBEDDING=disabled)CI covers the MySQL and MariaDB matrix.
🤖 Generated with Claude Code