gungnir.factory

make-datasource-map!

(make-datasource-map! ?options)

Creates a new datasource and returned a map of functions to query this datasource. Returned keys: * :close!-fn * :datasource * :find!-fn * :find-by!-fn * :all!-fn * :delete!-fn * :save!-fn

The following options are supported for ?options * DATABASE_URL - The universal database url used by services such as Heroku / Render * JDBC_DATABASE_URL - The standard Java Database Connectivity URL * HikariCP configuration map - https://github.com/tomekw/hikari-cp#configuration-options When both url and options are supplied: url - DATABSE_URL or JDBC_DATABASE_URL options - HikariCP options