Liking cljdoc? Tell your friends :D

dbee.core

Functions to query databases and a macro to generate a local database API.

The functions in this namespace provide a java.jdbc-like API for querying databases using HoneySQL queries. It assumes you will manage database connections in your application.

dbee.core/defdb will create an opinionated local database API based on the functions defined in this namespace. For configuration options and example usages, refer to the defdb docstring.

The functions used with either use case accept a number of common options. Those options include the following:

  • :long-running-threshold

The number of milliseconds to use as a long-running threshold. If queries exceed this value, a warning will be logged that includes the query and the run time. This value will override any default or configured value.

  • :row-fn

A function that will be executed against every row returned from the database. This value will override any default or configured value.

  • :result-set-fn

A function that will be applied to the entire returned result set.

Functions to query databases and a macro to generate a local database API.

The functions in this namespace provide a java.jdbc-like API for querying
databases using HoneySQL queries. It assumes you will manage database
connections in your application.

[[dbee.core/defdb]] will create an opinionated local database API based on the
functions defined in this namespace. For configuration options and example
usages, refer to the `defdb` docstring.

The functions used with either use case accept a number of common options.
Those options include the following:

* `:long-running-threshold`

The number of milliseconds to use as a long-running threshold. If queries
exceed this value, a warning will be logged that includes the query and
the run time. This value will override any default or configured value.

* `:row-fn`

A function that will be executed against every row returned from the
database. This value will override any default or configured value.

* `:result-set-fn`

A function that will be applied to the entire returned result set.
raw docstring

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

× close