execute

open fun execute(identifier: Int?, sql: String, parameters: Int, binders: <Error class: unknown class>.() -> Unit?): <Error class: unknown class><Long>

Execute provided query and return number of affected rows

Gets the prepared statement from cache, or prepares it and puts it in cache. Then creates a MySQLPreparedStatement and applies the binders to it. Then executes the statements, clears the allocated C-objects, checks for errors in execution and returns the number of affected rows.

Parameters

identifier

Unique identifier for this statement so it can be put in or retrieved from cache

sql

Query string with placeholders for parameter

parameters

number of parameters

binders

lambda to bind parameters