Skip to content

Instantly share code, notes, and snippets.

@spacepluk
Created January 23, 2018 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spacepluk/5f2bc9354ae297a6fc544920dabc6ea6 to your computer and use it in GitHub Desktop.
Save spacepluk/5f2bc9354ae297a6fc544920dabc6ea6 to your computer and use it in GitHub Desktop.
(def datasource (hikari/make-datasource {:adapter "postgresql"
:url "jdbc:postgresql://localhost:5432/somedb"}))
;; Doesn't seem to release the connections, it can only run `pool-size` times
(jdbc/with-db-connection [conn {:datasource datasource}]
(sql/some-hugsql-query conn))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment