Skip to content

Position paging on traversed order keys and projected records #396

Description

@0x054

Parent

Part of #372 (ADR-0018).

What to build

after / before work when an order key is a traversed column or the query is a projected record. position_of on a model instance requires those relations populated; a decoded tuple does not. position_of on a projected record requires every order key to be in the projection. Grouped aggregates still fail the primary-key-in-order-keys rule.

Acceptance criteria

  • order_by(lambda t: t.account.label).order_by(lambda t: t.id) pages with after / before from a tuple, without include().
  • position_of on a model instance with a traversed order key requires that path populated; unpopulated is a build-time error.
  • ProjectedQuery.after / before page records the same way instances page.
  • position_of(Row) works when every order key is in the projection; missing an order key is a build-time error (pass a tuple).
  • after / before on a grouped aggregate is a build-time error (PK is not an order key of a GROUP BY). Aggregate / expression order keys remain a build-time error.
  • Backend-matrix covers a traversed happy path and a projected-record happy path. Build-time suite covers the unpopulated / missing-key / aggregate errors.

Blocked by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions