Support filtering data records by arbitrary filters (#873) - #874
Open
KallynGowdy wants to merge 2 commits into
Open
KallynGowdy wants to merge 2 commits into
KallynGowdy wants to merge 2 commits into
Conversation
Adds a MongoDB-style `filter` option to `listData` when listing by marker, so callers can narrow results by JSON content in addition to marker/address pagination. Filters support $eq/$gt/$gte/$lt/$lte/$in/ $startsWith/$endsWith/$contains/$isNull with $and/$or/$not combinators, and are bounded by depth/size limits. Implemented via a new DataRecordsFilters module (parser + JS evaluator + Prisma JSON where-clause builder), wired through RecordsServer, DataRecordsController, DataRecordsStore, and all four store implementations (Memory, Prisma, Sqlite, Mongo). Sqlite applies the filter in JS on top of its existing raw marker query since Prisma can't push JSON filters into SQLite; Mongo rejects filters as not_supported since it's out of the issue's listed scope.
|
|
TigerBeetle startup (~8-10s to open its journal file) was right at the edge of Jest's default 10s beforeAll timeout, causing the entire RecordsServer.spec.ts suite (which shares one top-level beforeAll) to fail en masse under any CPU contention. Give that hook a 60s timeout. Also updates the procedures-listing snapshot to include the new `filter` input added to `listData` for #873.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a MongoDB-style
filteroption tolistDatawhen listing bymarker, so callers can narrow results by JSON content in addition to
marker/address pagination. Filters support $eq/$gt/$gte/$lt/$lte/$in/
$startsWith/$endsWith/$contains/$isNull with $and/$or/$not combinators,
and are bounded by depth/size limits.
Implemented via a new DataRecordsFilters module (parser + JS evaluator
DataRecordsController, DataRecordsStore, and all four store
implementations (Memory, Prisma, Sqlite, Mongo). Sqlite applies the
filter in JS on top of its existing raw marker query since Prisma
can't push JSON filters into SQLite; Mongo rejects filters as
not_supported since it's out of the issue's listed scope.