Skip to content

statement IDs #7

@quoll

Description

@quoll

All statements currently have IDs, however, these are not accessible through user interfaces. This issue is to introduce a query operation that can reference and bind statement IDs.

Basic graph patterns currently look like:
[subject predicate object]

where the predicate and object can be optional.

Add an optional transaction and :as values:
[subject predicate object tx-id :as id]

This ticket focuses on the statement IDs.

Implementation

There are 3 possibilities here:

  1. [s p o] This is an unbound anonymous var for the ID.
  2. [s p o :as ?id] where ?id is unbound
  3. [s p o :as ?id] where ?id is bound

In (1) we have 2 options: allocating a var that we never see, or keeping the code as-is. We may want to inspect the options here, but I think that by handling the 3-wide vs. 4-wide patterns then we could end up with a lot of extra code.

In (2) we expand BGP resolution. This may need a whole new set of patterns to match against in the protocol. Depending on (1) then we're either going to make all the pattern resolutions 4, or else we're going to double the side of the graph API.

In (3) then look up the statement index keyed by ID. If bound columns do not match, return nothing. Otherwise, return bindings on any unbound columns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions