Skip to content

Instantly share code, notes, and snippets.

(defn sp->transactions-helper
[db sp deletions-atom]
(let [{sname :name :as spec} (get-spec sp)
eid (or (-> sp :db-ref :eid) (get-eid db sp spec))
db-val (db/entity db (get-eid db sp spec))]
(with-meta
(hash-map
(for [{iname :name [cardinality type] :type :as item} (:items spec)]
(let [datomic-key (keyword (datomic-ns spec) (name iname))
(defun jim/cider-test-is-test-ns (ns)
(let ((suffix "-test"))
(string-match (rx-to-string `(: ,suffix eos) t) ns)))
(defun jim/cider-test-impl-ns-fn (ns)
(when ns
(let ((suffix "-test"))
(if (string-match (rx-to-string `(: ,suffix eos) t) ns)
(s-replace suffix "" ns)
(defun jim/cider-test-is-test-ns (ns)
(let ((suffix "-test"))
(string-match (rx-to-string `(: ,suffix eos) t) ns)))
(defun jim/cider-test-impl-ns-fn (ns)
(when ns
(let ((suffix "-test"))
(if (string-match (rx-to-string `(: ,suffix eos) t) ns)
(s-replace suffix "" ns)
(declare complete-mask)
(deftype CompleteMask [spec]
clojure.lang.IPersistentMap
(assoc [_ k v]
(throw (ex-info "Mask function not implemented." {:name "assoc"})))
(assocEx [_ k v]
(throw (ex-info "Mask function not implemented." {:name "assocEx"})))
(without [_ k]
(throw (ex-info "Mask function not implemented." {:name "without"})))
(def ^:dynamic *get-datomic-conn-fn*
"The function that the restify.clj spec-tacular plugin will use to
get a connection to datomic."
(fn []
(throw (ex-info "Must set *get-datomic-conn-fn*." {}))))