Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FC-1426 :vars Relationship binding fix for analytical queries #190

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

bplatz
Copy link
Contributor

@bplatz bplatz commented Jul 19, 2022

New :vars relationship binding support was added for simple-subject-query types, but not legacy analytical query types. This adds support to legacy query types.

The :vars relationship binding feature allows :vars variables to have multiple values (instead of previously there could be only one). They can be supplied with a :vars map with the value(s) being vectors - or :vars can be a vector of maps, with each being a unique set of bound vars for the query.

Using the fluree/chat demo ledger & data, this query now works. Note the ?s variable is bound to the subject, but ?x is what is selected. Two options are provided, and therefore two person results will be returned.

{
  "select": {"?x": ["*"]},
  "where": [["?s", "comment/person", "?x"]],
  "vars": {"?s": [387028092977155, 387028092977153]}
}

@bplatz bplatz requested a review from a team July 19, 2022 15:03
Copy link
Contributor

@cap10morgan cap10morgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@bplatz bplatz merged commit 09995be into main Jul 19, 2022
@bplatz bplatz deleted the fix/rel-bindings branch July 19, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants