Could it be possible to support (and) inside another (and)?

Hi, if to execute query:

[:find
 [?Post ...]
 :in
 $
 :where
 (or
  (or
   (or
    [?Post :Post/title "\"Post 1\""]
[?Post :Post/title "\"Post 2\""])))]

Datomic accepts it even or inside another or does not make any sense and it could be simplified to

[:find
 [?Post ...]
 :in
 $
 :where
 (or
  [?Post :Post/title "\"Post 1\""]
  [?Post :Post/title "\"Post 2 \""])]

But why we are using the first kind queries is because we are implementing the transformer of sql queries to datomic queries and it is very useful when or sql expression is transformed to its datomic equivalent without taking a care whether it is already inside another or expression. But the same rules we can’t apply for and expressions, we should know who is parent of the current processed and expression, if it is inside or expression then we should wrap the current built datoms by (and) otherwise wrapping should be skipped. So my question since datomic supports or inside or could be the same done for and conditions?

I’m about supporting the next queries:

[:find
 [?Post ...]
 :in
 $
 :where
 (or
  (and
   (and
    [?Post :Post/title "\"Post 1"\""]
    [?Post :Post/name "\"Post"\""])))]
2 Likes