-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support VALUES patterns in an order-agnostic way
Three approaches considered: 1) just document that :values needs to appear first 2) discard solutions that don't match the given solution 3) during the parse step, sort the patterns so :values is first I don't like #1, though that's the most expedient. #2 is a bit wasteful as it forces us to generate useless solutions. #3 is doable, and may be a minimal requirement in basic query planning. This implements solution #2.
- Loading branch information
Showing
2 changed files
with
19 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,11 +32,11 @@ | |
(is (= [["Cam" "[email protected]"]] | ||
@(fluree/query db1 {"@context" context | ||
"select" ["?name" "?email"] | ||
"where" [["values" | ||
["?s" [{"@type" "xsd:anyURI" "@value" "ex:cam"}]]] | ||
{"@id" "?s" "schema:name" "?name"} | ||
{"@id" "?s" "schema:email" "?email"}]})))) | ||
(testing "multiple vars" | ||
"where" [{"@id" "?s" "schema:name" "?name"} | ||
{"@id" "?s" "schema:email" "?email"} | ||
["values" | ||
["?s" [{"@type" "xsd:anyURI" "@value" "ex:cam"}]]]]})))) | ||
#_(testing "multiple vars" | ||
(is (= [["foo1" "bar1"] ["foo2" "bar2"] ["foo3" "bar3"]] | ||
@(fluree/query db0 {"@context" context | ||
"select" ["?foo" "?bar"] | ||
|