                                :tempids   {}
                                :tx-meta   tx-meta}) tx-data))))
 
-(defn db-with [db tx-data]
+(defn db-with
+  "Same as (with db tx-data) but will only return the new database (i.e. :db-after)."
+  [db tx-data]
   {:pre [(db/db? db)]}
   (:db-after (with db tx-data)))
 

;;  (clojure.edn/read-string {:readers datascript/data-readers} "...")
;;

(def data-readers {'datascript/Datom db/datom-from-reader
                   'datascript/DB    db/db-from-reader})

#?(:cljs
   (doseq [[tag cb] data-readers] (cljs.reader/register-tag-parser! tag cb)))

(defn resolve-tempid [_db tempids tempid]
  (get tempids tempid))

(defn db
  "Extracts the current database (as a value) from the connection."
  [conn]
  {:pre [(conn? conn)]}
  @conn)

