-
Notifications
You must be signed in to change notification settings - Fork 10
Description
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:
[s p o]This is an unbound anonymous var for the ID.[s p o :as ?id]where?idis unbound[s p o :as ?id]where?idis 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.