Embdded postgres for clojure based on otj-pg-embedded
(require 'pg-embedded-clj.core)
;; Start an embedded pg with default port:
(init-pg)
;; another call will halt the previous system:
(init-pg)
;; When you're done:
(halt-pg!)
NOTE: these will halt running pg-embedded instances
(require 'clojure.test)
(use-fixtures :once with-pg-fn)
(defn around-all
[f]
(with-pg-fn (merge default-config
{:port 54321})
f))
(use-fixtures :once around-all)
;;; You can also wrap ad-hoc code in init/halt:
(with-pg default-config
,,, :do-something ,,,)
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close