Repository navigation
feat(querying): row projections, keyset paging and capped counts (#65 onto main) - #66
Merged
Merged
Conversation
Three provider-neutral helpers for list endpoints that let the caller choose what to read: - RowProjection builds a Select to object[] rows from column expressions, with nested collection columns (ordered, capped). The query reads only the chosen columns, and its shape depends on which columns are chosen, never on values, so each choice compiles once. - AfterKeyset/OrderByKeyset page by the last row's key values instead of Skip, so a deep page costs the same as the first. Positions are sent as parameters; nullable keys are refused, since SQL comparisons with NULL would drop rows. - ToPageAsync reads one row beyond the page to say whether more follow, and CountUpToAsync stops counting at a limit, for lists that don't need an exact count of millions of rows. Integration tests on PostgreSQL 17 cover column pruning, collection columns, single compilation per shape and keyset completeness over duplicate keys.
QueryExpressions.Parameter turns a value into an expression EF Core sends as a parameter (the same capture Searchy uses), Convert exposes the invariant conversion, and TextMatch exposes the package's text match, now with a suffix variant as well as prefix and contains. For code that builds its own filter expressions without going through SearchyRequest.
feat(querying): row projections, keyset paging and capped counts
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
AhmadRAbuhussein
approved these changes
Oct 20, 2026
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.
#65 was stacked on #64 and merged into
muhannad/searchy-parametersafter #64 had already gone tomain, so its two commits never reachedmainand 10.1.0 was published without them. This PR brings them over unchanged.What it adds (same content as reviewed in #65):
RowProjection.Of<T>/Many<T,TChild>: project a chosen set of member paths intoobject[]rows in SQL, so a caller can return only the columns it asked for.OrderByKeyset/AfterKeyset/ToPageAsync: keyset (cursor) paging over any sort, with a unique tiebreaker key.CountUpToAsync: a count that stops at a limit and reports whether it was exceeded, so large lists don't pay for an exact count.QueryExpressions(Parameter,Convert,TextMatch): the same parameterised value and text-match building blocks Searchy uses, for callers that build their own filters.Tests: the PgSql integration suite (Testcontainers) and unit tests pass on the branch. Publishes 10.1.1.