yesql query middleware for databases managed by sql-file.
Queries may declare how their results are returned with a query-mode info value in the query file:
-- name: count-points
-- info-query-mode: :scalar
SELECT COUNT(*) FROM point
The modes are :direct (the default: the rows as returned), :scalar (the single value of a single-column result, or nil), :row (the first row, or nil) and :column (the values of a single-column result).
yesql query middleware for databases managed by sql-file.
Queries may declare how their results are returned with a
query-mode info value in the query file:
-- name: count-points
-- info-query-mode: :scalar
SELECT COUNT(*) FROM point
The modes are :direct (the default: the rows as returned), :scalar
(the single value of a single-column result, or nil), :row (the
first row, or nil) and :column (the values of a single-column
result).Run each query on the current connection (see sql-file.middleware), unless the call supplies a :connection of its own.
Run each query on the current connection (see sql-file.middleware), unless the call supplies a :connection of its own.
(log-query-middleware query-fn)Log the start and end (with elapsed time) of each query, at debug level.
Log the start and end (with elapsed time) of each query, at debug level.
The standard middleware for queries run against the current connection: connection, query mode, and logging. Pass it as the :middleware option of yesql's defqueries.
The standard middleware for queries run against the current connection: connection, query mode, and logging. Pass it as the :middleware option of yesql's defqueries.
(query-mode-middleware query-fn)Shape each query's result according to its query-mode info value.
Shape each query's result according to its query-mode info value.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |