我試圖刪除datomic repl中的datomic數據庫。我有交易者和對等服務器運行,並且正在使用客戶端API。下面是我在做REPL:爲什麼在嘗試刪除datomic db時會出現http-錯誤?
(require '[clojure.core.async :refer [<!!]]
'[datomic.client :as client])
(use 'datomic.client.admin)
(pprint (<!! (delete-database
{:db-name "datemo"
:account-id client/PRO_ACCOUNT
:secret "datemo"
:region "none"
:endpoint "localhost:8998"
:service "peer-server"
:access-key "datemo"})))
我得到的錯誤看起來是這樣的:
{:cognitect.anomalies/category :cognitect.anomalies/incorrect,
:datomic.client/http-error {:cause "Invalid Op"}}
的docs for the datomic client呼籲的地圖的論點,這就是上面提供。他們也似乎表明,所需要的參數是:db-name
,但如果我這樣做:
(pprint (<!! (delete-database {:db-name "datemo"})))
我得到一個錯誤,指出「連接配置」是無效的:
#:cognitect.anomalies{:category :cognitect.anomalies/incorrect,
:message
"Incomplete or invalid connection config: {:timeout 60000, :account-id \"00000000-0000-0000-0000-000000000000\", :access-key \"datemo\", :secret \"datemo\", :endpoint \"localhost:8998\", :service \"peer-server\", :region nil, :db-name \"datemo\"}"}