DatabaseClient
A wrapper client around Vert.x SqlClient for queries and an Exposed Database to generate SQLs working around the limitations of Exposed.
Parameters
whether to validate whether the batch statements have the same generated prepared SQL.
Constructors
Functions
This function is not conventional and it usages are likely to degrade performance.
Executes a batch of update statements, including InsertStatement and UpdateStatement.
Use SqlClient.preparedQuery here because of PgConnectOptions.setCachePreparedStatements.
This function may be very rarely used, as eq
conditions can usually be combined into an inList
select query.
SQL: SELECT <expression>;
. Example: SELECT EXISTS(<query>)
.
SQL: SELECT <expression> FROM <table>;
. Examples: SELECT COUNT(*) FROM <table>;
, SELECT SUM(<column>) FROM <table>;
.
In most cases you should specify the fields to update in a more detailed way instead of using this function.
Currently only available for 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.