Skip to content

Commit b50627a

Browse files
committed
chore(changeset): state the refusal and its hand fix without a rewrite label
Claude-Session: https://claude.ai/code/session_01DEvba2nBuD4tWzfq8r8NFY Co-authored-by: Claude <noreply@anthropic.com>
1 parent 186e75a commit b50627a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.changeset/20546-no-operator-object-on-scalar.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Clause-②: no (narrowing)
1212

1313
The judged fields are the spec's scalar-valued classes: every type in `SCALAR_FILTER_HEAD_TYPES` (text-like, numeric, boolean, date, datetime, time, single-option, `autonumber`, `summary`), with or without `multiple: true`, and the multi-option types (`multiselect`, `checkboxes`, `tags`). A `having` column is judged by the type it carries: a `count` / `sum` / `avg` is a number, a groupBy or `min` / `max` column the type of its field, a date bucket a date or text label.
1414

15-
FROM a plain object with no `$` key beneath such a field → TO `INVALID_FILTER` / 400, naming the field, its declared type, the object's keys and the position (`where.amount`, `aggregations[1].filter.amount`, `having.total`). The fix is one line: compare the field with a value (`{ "amount": 12 }`) or an operator (`{ "amount": { "$gt": 12 } }`); to filter by a related record, name a relation field.
15+
The refusal names the field, its declared type, the object's keys and the position (`where.amount`, `aggregations[1].filter.amount`, `having.total`). No mechanical rewrite exists, because which value or operator the caller meant is not in the object; the fix is one line by hand: compare the field with a value (`{ "amount": 12 }`) or an operator (`{ "amount": { "$gt": 12 } }`), and to filter by a related record, name a relation field.
1616

1717
Measured through `engine.find` / `engine.aggregate` and `POST /data/:object/query`, three rows:
1818

0 commit comments

Comments
 (0)