executeQuery
open fun <R> executeQuery(identifier: Int?, sql: String, mapper: (<Error class: unknown class>) -> <Error class: unknown class><R>, parameters: Int, binders: <Error class: unknown class>.() -> Unit?): <Error class: unknown class><R>
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 finally maps the result using the mappers and a MySQLCursor.
Parameters
identifier
Unique identifier for this statement so it can be put in or retrieved from cache
sql
Query string with placeholders for parameter
mapper
lambda that takes an SQLCursor
and produces a QueryResult with mapped data
parameters
number of parameters
binders
lambda to bind parameters