xtdb / xtdb

An immutable SQL database for application development, time-travel reporting and data compliance. Developed by @juxt
https://xtdb.com
Mozilla Public License 2.0
2.58k stars 169 forks source link

`and` clauses should be allowed at the top level of a query (despite being implicit) #1083

Open jarohen opened 4 years ago

jarohen commented 4 years ago
(crux/q (crux/db node)
        '{:find [x]
          :where [(and [x :a 1]
                       [x :b 2])]})
hraberg commented 4 years ago

EDN Datalog doesn't allow for this, and only introduces and to deal with or and or-join, while keeping simple branches succinct. If we add it it should be normalised away early on and not change the query processing itself.