   component/Lifecycle
   (start [this]
     (with-open [rdr (java.io.PushbackReader. (io/reader res))]
-      @(d/transact (get-in this [:connection :connection])
+      @(d/transact (conn (this :connection))
                    (binding [clojure.tools.reader/*data-readers*
                              {'db/id datomic.db/id-literal
                               'db/fn datomic.function/construct

   [datomic.api :as d]
   [schema.core :as s]
   clojure.tools.reader))

(defrecord EphemeralDatabase [uri]
  component/Lifecycle

(defrecord DatomicFunctions [functions]
  component/Lifecycle
  (start [this]
    @(d/transact (conn (this :connection)) (create-functions functions))
    this)
  (stop [this] this))

