TortugaResearch / Tortuga.Chain

A fluent ORM for .NET
Other
336 stars 22 forks source link

Keyset Pagination #333

Open Grauenwolf opened 4 years ago

Grauenwolf commented 4 years ago

.WithPaging(int pageSize, object? skipPast, params SortExpression[] sortExpressions)

ref:

Grauenwolf commented 4 years ago

Auto-append the primary column to the list of sort expressions. This ensures that there is always at least one unique key.

Grauenwolf commented 4 years ago

If a unique column appears anywhere other than the last slot in the sorting expressions, then everything beyond that point could be ignored.

We aren't actually going to check for this. Is someone wants to use ORDER BY UniqueColumn, AnotherColumn then we'll let them. The database can figure it out.