DeleteQuery
A DELETE under construction.
A WHERE is required, on the same terms as UpdateQuery: emptying a table is a statement worth having to mean, and a builder that lets it fall out of a null filter is how it happens by accident. Write it as OctaviusClient.rawQuery where it is meant.
val removed = db.deleteFrom("expired_mandates")
.where("expires_at < @cutoff")
.returning("id")
.fetchFields<Int>("cutoff" to cutoff)Properties
Functions
Switches this query to the result style: every terminal on the returned object hands back a DataResult instead of throwing.
Turns this query into a step of a TransactionPlan instead of something to run now.
Returns an independent copy, so that variants can be built from a shared base.
Carries registered converters into a builder's copy(), alongside whatever clauses it copies.
As fetchField, but the query must return exactly one row rather than at most one.
Runs the query and returns its single row, throwing where the count was anything but one.
Builds the driver query a terminal is about to run, with this query's own converters on it.
Marks the WITH clause RECURSIVE.
Registers a ParameterConverter for this query and nothing else.
Registers a ResultConverter for this query and nothing else.
Adds a RETURNING clause, which turns this into a query the fetch* family can read.
Sets the USING clause, for a delete that joins against other tables.
Sets the WHERE condition. Required.
Adds a common table expression. Call it more than once for more than one.