In Datomic, a Datalog query is written in extensible data notation (edn). Edn is a data format similar to JSON, but it:
Edn consists of:
"This is a string"
[1 2 3]
[:find ?foo ...]
(3.14 :foo [:bar :baz]),
(+ 1 2 3 4)
Here is an example query that finds all movie titles in our example database:
[:find ?title :where [_ :movie/title ?title]]
Note that the query is a vector with four elements:
[_ :movie/title ?title]
We'll go over the specific parts of the query later, but for now you should simply type the above query verbatim into the textbox below, press Run Query, and then continue to the next part of the tutorial.