Filters are expected as PersistentLists, and fail otherwise.
With a list:
(let [fclause (list '= '?v 5)]
(f/format-query {:prefixes {:ex "<http://ex.com/>"}
:select '[?e]
:where ['[?e :ex/value ?v]
[:filter fclause]]}))
Returns: "PREFIX ex: <http://ex.com/> SELECT ?e WHERE { ?e ex:value ?v . FILTER (?v = 5) }"
With a cons seq:
(let [fclause (cons '= '(?v 5))]
(f/format-query {:prefixes {:ex "<http://ex.com/>"}
:select '[?e]
:where ['[?e :ex/value ?v]
[:filter fclause]]}))
Comes back with:
Execution error (ExceptionInfo) at com.yetanalytics.flint/conform-sparql (flint.cljc:44).
Syntax errors exist in the WHERE clause!
Filters are expected as
PersistentLists, and fail otherwise.With a list:
Returns:
"PREFIX ex: <http://ex.com/> SELECT ?e WHERE { ?e ex:value ?v . FILTER (?v = 5) }"With a cons seq:
Comes back with: