我正在尝试在 Datomic(免费或内存)中创建一个分区,但是,当查询时,新分区没有出现,并且在尝试使用它时出现异常。这种行为是自由模式或内存模式固有的吗?
(defn create-mdb []
(def uri "datomic:mem://localhost:4334//billing")
(d/create-database uri)
(def conn (d/connect uri))
(def mdb (db conn))
)
(defn create-partition []
(d/transact conn [
{:db/id (d/tempid :db.part/db)
:db/ident :billing
:db.install/_partition :db.part/db}
]))
(defn partitions []
(d/q '[:find ?ident
:where
[:db.part/db :db.install/partition ?p]
[?p :db/ident ?ident]
] mdb))
=> (create-mdb)
#'ww.billing/mdb
=> (create-partition)
#<promise$settable_future$reify__4637@714cf72c: {:db-before datomic.db.Db@193e901b, :db-after datomic.db.Db@eeb64b5b, :tx-data #<ArrayList [datomic.db.Datum@a15d2d7d, datomic.db.Datum@9f207ac0, datomic.db.Datum@7e4]>, :tempids {-9223367638809264704 62}}>
=> (partitions)
#<HashSet [[:db.part/db]]>
请问有什么线索吗?