fun getReusable(): ReusableDeleteStatement
Gives a reference to a reusable statement object. This allows clients to avoid the (small) lookup overhead for a frequently-used delete statement.
Usage:
val intParam = Parameter(Types.sqlInt)
val deleteFrom = (db.deleteFrom(TestTable) + " WHERE " + TestTable.id + "=" + intParam).getReusable()
val id = <...>
val deleted = deleteFrom run {
it[intParam] = id
}
Throws IllegalStateException if this statement is not cacheable.