prepare method
Prepares a SQL statement for execution.
The connectionId must be a valid active connection.
The sql should be a parameterized SQL statement.
The timeoutMs specifies the statement timeout in milliseconds
(0 = no timeout).
Returns a statement ID on success, 0 on failure.
Implementation
int prepare(int connectionId, String sql, {int timeoutMs = 0}) {
return _withSql<int>(
sql,
(sqlPtr) => _bindings.odbc_prepare(connectionId, sqlPtr, timeoutMs),
) ??
0;
}