Executing queries against a configured database — platform's data-access API.
The sanctioned surface for every module's persistence layer. Modules used to
require wagoe.platform.shell.adapters.database.common.core instead, which
is platform's shell: 20 sites across tenant, user, admin, workflow and
devtools reaching into another module's internals, carried as the largest
entry in .wagoe/check-ports.edn (BOU-303).
Deliberately narrower than what it delegates to. Connection-pool lifecycle,
raw SQL formatting and adapter construction stay internal — a module needs
to run a query, not to build a pool. wagoe.platform.ports.database is the
other half: what an adapter must implement.
Not a protocol, and that is the point. There is one way to execute a
HoneySQL map against a JDBC connection, and the differences between engines
live behind the DBAdapter port. A second protocol here would name a seam
nothing implements — the mistake ADR-037 removed.
Executing queries against a configured database — platform's data-access API. The sanctioned surface for every module's persistence layer. Modules used to require `wagoe.platform.shell.adapters.database.common.core` instead, which is platform's shell: 20 sites across tenant, user, admin, workflow and devtools reaching into another module's internals, carried as the largest entry in `.wagoe/check-ports.edn` (BOU-303). Deliberately narrower than what it delegates to. Connection-pool lifecycle, raw SQL formatting and adapter construction stay internal — a module needs to run a query, not to build a pool. `wagoe.platform.ports.database` is the other half: what an adapter must implement. Not a protocol, and that is the point. There is one way to execute a HoneySQL map against a JDBC connection, and the differences between engines live behind the `DBAdapter` port. A second protocol here would name a seam nothing implements — the mistake ADR-037 removed.
Create an index unless it is already there.
Create an index unless it is already there.
Engine, version and connection details for this context.
Engine, version and connection details for this context.
Whether x is a database context this namespace can use.
Whether `x` is a database context this namespace can use.
Run one statement over many parameter sets.
Run one statement over many parameter sets.
Run a query and return the first row, or nil.
Run a query and return the first row, or nil.
Run a query and return every row.
Run a query and return every row.
Run an insert/update/delete. Returns the update count.
Run an insert/update/delete. Returns the update count.
The database configuration the application is running on.
Published because tenant provisioning needs it to open a connection to a second database — the one case where a module legitimately asks what it is connected to.
The database configuration the application is running on. Published because tenant provisioning needs it to open a connection to a second database — the one case where a module legitimately asks what it is connected to.
Create the tables described by a collection of Malli schemas, if absent.
Create the tables described by a collection of Malli schemas, if absent.
Every table name in this database.
Every table name in this database.
Whether table exists in this database.
Whether `table` exists in this database.
(with-transaction binding & body)Run body in a transaction, bound to the first name in binding.
(with-transaction [tx ctx] (execute-update! tx query1) (execute-update! tx query2))
Run `body` in a transaction, bound to the first name in `binding`. (with-transaction [tx ctx] (execute-update! tx query1) (execute-update! tx query2))
Call f with a transaction context, committing or rolling back around it.
Call `f` with a transaction context, committing or rolling back around it.
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 |