DatabaseClient
The main entry point for executing database operations using Vert.x SQL Client with Exposed SQL generation.
This client wraps a Vert.x SqlClient for reactive query execution and uses Exposed for SQL generation, combining the type-safe SQL DSL of Exposed with the reactive, non-blocking capabilities of Vert.x.
Parameters
the type of Vert.x SQL client, which can be SqlClient, Pool, or SqlConnection or one of its database-specific subtypes.
the Vert.x SQL client used for executing queries.
the configuration for this client, including SQL transformation, transaction settings, and the transaction provider for SQL statement preparation.
See also
Constructors
Secondary constructor that accepts a Database for backward compatibility.
Properties
Functions
See the KDoc of the overload with resultRowMapper parameter.
Executes a batch of update statements, including InsertStatement and UpdateStatement.
Use SqlClient.preparedQuery here because of SqlConnectOptions.setCachePreparedStatements.
An alternative API to executeQuery that returns a List instead of a RowSet.
Executes the given block within an Exposed transaction context suitable for SQL statement preparation.
Executes the given block within an Exposed transaction context suitable for SQL statement preparation, without storing the transaction in ThreadLocal or coroutine context.
An alias of withSavepoint.
Currently only supported with PostgreSQL. A savepoint destroys one with the same name so be careful.
When using this function, it's recommended to name the lambda parameter the same as the outer receiver so that the outer DatabaseClient is shadowed, and so that you don't call the outer DatabaseClient without a transaction by accident.
When using this function, it's recommended to name the lambda parameter the same as the outer receiver so that the outer DatabaseClient is shadowed, and so that you don't call the outer DatabaseClient without a transaction by accident.
Polymorphic transaction function for DatabaseClient<*> with either Pool or SqlConnection as the DatabaseClient.vertxSqlClient.
Polymorphic transaction function for DatabaseClient<*> with either Pool or SqlConnection as the DatabaseClient.vertxSqlClient.
A variant of withTransaction that casts the SqlConnection to a specific subtype.
Polymorphic transaction function for DatabaseClient<*> with either Pool or SqlConnection as the DatabaseClient.vertxSqlClient.