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.
Hi, this merge request adds an abilty to build expression cursor.
When we need to paginate records and order them by value generated on the fly,
we will need that value in the both order by and where clauses.
Use case:
If we need to paginate records with cursor_fields: [:rank_value, :id], where
rank_value is calculated on the fly we can do the following:
From example above we can see that the cursor_fields now accepts and tuples.
The first element of the tuple is the name of the cursor field and the second one is a
function responsible for how the value should be generated.