Skip to content

feat(sql): OR-group filters (find rows involving a principal) #220

Description

@RAprogramm

Queries of the form "rows where the user participates in any role" fall back to raw SQL:

WHERE parcel_id = $1 AND (requester_id = $2 OR subject_id = $2)
WHERE sender_id = $1 OR recipient_id = $1 OR courier_id = $1

Proposal — an entity-level scope declaration:

#[scope(involving: requester_id | subject_id)]

Generated: list_involving(value, limit, offset) plus a variant with additional equality filters (list_involving_where), OR-ing the declared columns against one bound value. Covers the participant-listing pattern without a general query DSL.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions