user2424835
user2424835

Reputation: 75

query paths in Datomic (follow attributes from root to leaves in a tree)

I have a tree structure with :node-left and :node-right, which connect entities of the same type until these attributes are not present.

I am interested in querying for paths from the root to the leaves, so that the result would be a vector of type ([root, node1, leaf11] [root, node2, leaf21]).

Upvotes: 1

Views: 175

Answers (1)

Stuart Dabbs Halloway
Stuart Dabbs Halloway

Reputation: 1666

While you could do this with query, you might also take a look at implementing graph algorithms directly. This blog post shows examples of both approaches.

Upvotes: 3

Related Questions