Skip to content

The Where vocabulary and its lowering; the filter module retyped #1147

Description

@borisno2

Parent

#1123 — build spec 3 of the Prisma 8 architecture spec. Lands on the prisma-8 integration branch, not main.

What to build

.where() and .orderBy() accept the closed Where vocabulary — equals, not, in, notIn, lt, lte, gt, gte, contains; AND/OR/NOT; some/every/none on any relation — lowered onto Prisma's lambda in one place, total or throwing including under sudo; contains is engine-escaped and case-insensitive; equals: null lowers to IS NULL; a relation predicate ANDs the related list's query access inside the EXISTS, denied meaning empty; orderBy is scalar-only. The filter module's condition type becomes a vocabulary value, query validation gains the operator check, and the count-filter marker, resolvers and label pass-through are deleted.

Acceptance criteria

  • Each operator lowers and returns the expected rows on the Test context; contains: '50%' matches a literal percent sign
  • An unknown key or operator throws a validation error naming the list and key, under sudo too
  • A predicate naming a field the session cannot read throws identically to a nonexistent field
  • some over a related list the session cannot query is false; none/every true
  • The filter module imports nothing from the ORM; the deleted count-filter symbols are gone

Blocked by


Generated by Claude Code

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

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions