Closed jmatsushita closed 7 years ago
Hello @jmatsushita. This is a fantastic suggestion. I have a few hours of spare time coming up. I'll look into this and #40 .
Great ! :)
Some preliminary work about this here: https://github.com/jacoscaz/node-quadstore/blob/joins/test/quadstore.js#L586
I've had to slightly change your proposal as I needed to maintain the ordering of term names:
quadStore.query(matchTermsA)
.join(quadStore.query(matchTermsB), ['subject'], ['graph'])
.get((err, quads) => {});
See pull request #43
Closing, available on NPM in quadstore@2.2.0-alpha .
Hi there,
Currently I believe it's only possible to join two queries by an identical property (i.e.
predicate
topredicate
)It would be great to be able to join queries by joining on different fields. This kind of API would do I guess:
Allowing to still pass strings would keep backward compatibility, and allowing objects would enable joining by different properties.
What do you think?
Jun