| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…egate, upsert Wraps the scan-free entity routes added in base44-dev/apper#24939. Fifty apps with the deepest `skip` reads were reviewed; none paged because a user asked for page N. Every loop existed to get a number, to check whether a key already exists, to walk a table with a resume point that is not an offset, or to list a field's distinct values. - list(options) / filter(query, options): pass an options object {sort, limit, cursor, fields} instead of positional args to read one cursor page; returns {items, next_cursor, has_more}. Positional calls are unchanged. skip is documented as deprecated for loops. - count(query?): number of readable records matching a filter. - distinct(field, query?): {values, truncated}, capped at 5000 values. - aggregate(spec): group_by / date_bucket / count / sum / avg / min / max / count_distinct / having / sort / limit; returns {rows, truncated}. - upsert(records, {key}): create or update by a natural key, up to 500 records. New public types are exported and listed in types-to-expose.json. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rameter Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- aggregate spec: `query` (not `match`), camelCase keys (`groupBy`, `dateBucket`, `countDistinct`), and no rule against combining countDistinct with other measures - cursor pages default to 100 rows; the maximum stays 5,000 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A cursor token now carries the query, sort and fields of the walk, so a later page needs only cursor and limit (same model as Wix Data cursorPaging). distinct moves out of aggregate-only usage into an option on list()/filter() that returns a page of values, matching how query APIs usually expose it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
aggregate(stages[]) posts { pipeline } to the same route; field names are the
entity's own and the server translates them. The spec form stays the primary,
typed API; the pipeline is the escape hatch for what the spec cannot express.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… index use" This reverts commit 8128270.
This reverts commit cd90cc1.
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/sdk@0.8.48-pr.287.c4af256Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk: npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.48-pr.287.c4af256"Or add it to your package.json dependencies: {
"dependencies": {
"@base44/sdk": "npm:@base44-preview/sdk@0.8.48-pr.287.c4af256"
}
}
Preview published to npm registry — try new features instantly! |
Sorry, something went wrong.
The entities primitives (and every other route that raises ApiError) answer
with {"error": {"code", "message", "details"}}. The error mapper only read the
legacy top-level code/message, so a caller catching an invalid_cursor 400 saw
code undefined and axios's generic message. Found while running the preview
build of this branch inside a Base44 app.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Why
Fifty apps with the deepest skip reads on the entities cluster were reviewed. None of them pages because a user asked for page N. Every deep-skip loop exists to get something the SDK cannot give:
Three apps built binary search with limit-1 probes as a substitute for count (skips of 10.2M, 900k and 64k). Builders persist lastSkip as a resume token because nothing else exists.
The server routes land in base44-dev/apper#24939. This PR is the SDK half, and its purpose right now is to settle the API shape. Version stays 0.8.x: everything is additive, so existing apps on ^0.8.x pick it up on their next install.
Proposed API
Design notes:
What
New types are exported from the package entry and listed in types-to-expose.json for the docs pipeline. JSDoc follows the sdk-docs-writing skill: description, params, returns, examples on every method.
Tests
No version bump, following the repo's separate chore: bump version commits.
🤖 Generated with Claude Code