       db)))
 
 (defn query-entity
-  "Like query-entities, but returns a single result. This leverage datomic
+  "Like query-entities, but returns a single result. This leverage Datomic
   single result :find, meaning it is effectively more efficient than query-entities."
   [{::keys [db] :as env} dquery]
   (let [subquery (entity-subquery env)]

         p/ast->query)))

(defn pick-ident-key
  "Figures which key to use to request data from datomic. This will
  try to pick :db/id if available, returning the number directly.
  Otherwise will look for some attribute that is a unique and is on
  the map, in case of multiple one will be selected by random. The

          :not-in/datomic
          [:country/name]}]}]

  The sub-query will be send to Datomic, filtering out unsupported keys
  like `:not-in/datomic`."
  [{::keys [db] :as env} dquery]
  (let [subquery (entity-subquery env)]
