是否可以执行" repairDatabase"命令Monger?如果是这样的话?
答案 0 :(得分:1)
(:require [clojure.test :refer :all]
[monger.core :as mc]))
(deftest ^:focused repair-db-test
(let [conn (mc/connect)
db (mc/get-db conn "test-db")]
(is (= {"ok" 1.0}
(mc/command db {:repairDatabase 1})))))
答案 1 :(得分:0)
我发现你可以做到:
(monger.core/command db {:repairDatabase 1})