使用 Datomic,我对如何使用本地数据库感到困惑
如果我输入:
>>(ns datomic-tut (:use [datomic.api :as d]))
nil
>>(d/create-database "datomic:mem://hello")
true
>> (d/connect "datomic:mem://hello")
#<LocalConnection datomic.peer.LocalConnection@57102fab>
>> Ctrl-D to Disconnect
然后,如果我重新启动 repl:
>> (ns project-ns (:use [datomic.api :as d]))
nil
>> (d/connect "datomic:mem://hello")
ExceptionInfo :peer/db-not-found Could not find hello in catalog clojure.core/ex-info (core.clj:4227)
我可以创建另一种类型的本地 uri 来保存我创建的数据库吗?