Skip to content

GQ: exact edge selection and deletion without broad endpoint deletes #660

Description

@ragnorc

Problem

Mutation predicates cannot express the endpoint intersection needed for a precise edge deletion. On 0.10.0:

query q() { delete Knows where from = "a" and to = "b" }

fails parsing at and. A single declared edge property can be used as a predicate, so deletion is not limited strictly to from or to. However, the implicit edge id is not accepted as an ordinary declared property in the tested form.

Two separate endpoint deletes are a union, not an intersection, and may remove unrelated edges. Parallel edges also mean endpoint pairs alone may not identify exactly one relationship.

Proposed change

Provide a typed way to select/delete one edge by stable identity and support conjunction where a compound predicate is intended. Clarify exact-one versus set deletion, missing-edge behavior, branch scope and affected-edge receipts.

Coordinate with #548's system-column namespace and #593's edge keys. Deduplicating insertion by a key does not by itself supply a safe selection/deletion grammar.

Acceptance criteria

  • With edges a→b, a→c, d→b and parallel a→b edges, deleting one selected identity removes only that edge.
  • Endpoint conjunction removes exactly the intended set, not the union of each predicate's matches.
  • Selection is type checked, parameterizable, branch-aware and reflected accurately in receipts.
  • Stable edge identity survives export and branch/merge behavior under the documented identity contract.

Related: #583 tracks convergent duplicate edges. Mutation grammar, predicate type checking.

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

    featureFeature proposalneeds-triageAwaiting maintainer triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions