Liking cljdoc? Tell your friends :D

pg-embedded-clj

Embedded postgres for clojure - based on otj-pg-embedded

Usage

Clojars Project

Development:

(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!)

Testing:

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
                           :log-redirect "wibble.log"})
                    f))

(use-fixtures :once around-all)

;;; You can also wrap ad-hoc code in init/halt:
(with-pg default-config
	,,, :do-something ,,,)
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close