execute

open override fun execute(identifier: Int?, sql: String, parameters: Int, binders: SqlPreparedStatement.() -> Unit?): QueryResult<Long>

Execute a SQL statement.

Return

The number of rows updated for an INSERT/DELETE/UPDATE, or 0 for other SQL statements.

NOTE it is up to the specific driver to correctly return the row changes. Notably the SQLJS driver does not do this and you should query changes() manually.

Parameters

identifier

An opaque, unique value that can be used to implement any driver-side caching of prepared statements. If identifier is null, a fresh statement is required.

sql

The SQL string to be executed.

parameters

The number of bindable parameters sql contains.

binders

A lambda which is called before execution to bind any parameters to the SQL statement.