Skip to content

Variables beginning with $ are not supported #42

Description

@quoll

format-query on a query using $ vars are reported as a syntax error:

(f/format-query '{:prefixes {:ex "<http://ex.com/>"}
                  :select [$e]
                  :where [[$e :ex/ref ?a]]}
                :pretty? true)

Throws with: Syntax errors exist in the SELECT and WHERE clauses!

(f/format-query '{:prefixes {:ex "<http://ex.com/>"}
                  :select [?e]
                  :where [[?e :ex/ref $a]]}
                :pretty? true)

Throws with: Syntax errors exist in the WHERE clause!

This is syntax on the Clojure side, which is defined by Flint. So it is not strictly a bug. However, it is unexpected.

Since elements like variable names get copied directly into SPARQL, then I would expect $a to be accepted and show up in the SPARQL the same way.

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