SeaQL / SeaQL/sea-orm

CursorTrait implementation for SelectTwo

Open
#1,083 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:pagination Category:enhancement
Dominant language
Rust
Stars
9.9k
Forks
734
Avg merge
6h 36m
Merged PRs (30d)
8

Description

Motivation

Cursor-based pagination is implemented for single tables, but we can't use it when querying with related table, even it's the same concept and most of the work done still apply.

Proposed Solutions

I don't know the best implementation but I guess Cursor struct should be edited to support two tables and the API should support some way of indicating which table columns on before and after belongs to.
Then CursorTrait can be implemented for SelectTwo and SelectTwoMany.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing cursor-based pagination implementation for single-table queries and the CursorTrait API. Then investigate how SelectTwo and SelectTwoMany represent related-table columns and how before/after values identify their tables. Done means related-table queries support cursor pagination with an API that clearly handles columns from either table.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.