Conversation
This was referenced Feb 17, 2026
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #453 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 109 109
Lines 16000 16013 +13
Branches 861 1432 +571
==========================================
+ Hits 16000 16013 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b7ccc5e to
ecb8a06
Compare
a83c7cd to
d5ce982
Compare
ecb8a06 to
94a693f
Compare
ide
approved these changes
Feb 17, 2026
...ges/entity-database-adapter-knex/src/__integration-tests__/PostgresEntityIntegration-test.ts
Outdated
Show resolved
Hide resolved
d5ce982 to
7397d82
Compare
94a693f to
005b82c
Compare
7397d82 to
d4c6c1c
Compare
005b82c to
e01d842
Compare
Member
Author
Merge activity
|
e01d842 to
00ac642
Compare
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.

Why
The one downside of using id-based cursor pagination and subqueries (added in #422, #431) is that it risks the row referenced by the cursor being deleted between pagination requests. It's an edge case though to be clear. Encoding the full cursor alleviates this, but has it's own downsides since trigram similarity isn't encodable and neither are things like Date objects. It is still preferable to use ID-based cursors for all pagination.
But it becomes the library's responsibility to explicitly document what the behavior is when a row referenced by the cursor is no longer present. This PR does this.
How
When the cursor row is no longer present, the tuple evaluates to
NULL, which produces a empty page.The alternative to this behavior is to run an id check query ahead of the pagination query, and throw an error if it doesn't exist, or even return the first page of data if it doesn't exist. Both of these are less optimal since they cause unexpected behavior during results consumption.
So we keep the behavior as is and explicitly document it.
Test Plan
Run new tests.