Skip to content

STAMQL: Allow multiple subqueries #28

@proycon

Description

@proycon

Currently a query only allows a single subquery. This was done to ensure all
variables in the results are always bound.

Having multiple subqueries means a combinatorial 'explosion' in the result set.
Given a query (A) and subqueries (X,Y,Z) where X in turn has subqueries (C,D).
We have the following hierarchy:

?A
    ?X
        ?C
        ?D
    ?Y
    ?Z

The result row binds not just a single set of variables now but differs according to the subquery path:

?A * ?X * ?C
?A * ?X * ?D
?A * ?Y
?A * ?Z

Say ?A yields a,b,c and ?Z yields p,q, then for the last bindings alone we get six results:

a p
a q
b p
b q
c p
c q

In spite of the combinatorial explosion, having multiple subqueries may give
necessary flexibility. Most notably, I think we can do away with the concept of
'highlight queries' in visualisation then, as subqueries can take over that role.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestreadyImplemented, pending release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions