Skip to content

after(position) on non-null root order keys #393

Description

@0x054

Parent

Part of #372 (ADR-0018).

What to build

after(position) pages a query whose order keys are root columns, include the primary key, and are all non-nullable. position is the ordered tuple of those values; position_of(row) reads it; after(row) is sugar. The bound is exclusive. A nullable order key is a build-time error until #394.

Acceptance criteria

  • after((ts, id)).limit(n) returns the next n matching rows after that position, declared order, exclusive of the position.
  • position_of(row) returns the order-key tuple; after(row) equals after(position_of(row)).
  • Order keys must include the model's primary key; PK-less models fail at build time. Do not append the PK silently.
  • A nullable order key is a build-time error (lifted by the NULL-aware ticket).
  • after + offset is a build-time error. count() drops the bound. Mutations reject it the same way they reject limit/offset.
  • Wrong arity is a build-time error. A bound that matches no rows is an empty page.
  • QueryIR fetch payloads carry one after bound with typed values. Golden vector pins the shape. count / mutate verb policy stays: bound dropped / paging keys omitted.

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