Skip to content

Filter clauses fail on Cons expressions #43

Description

@quoll

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!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions