prepare method

int prepare(
  1. int connectionId,
  2. String sql, {
  3. int timeoutMs = 0,
})

Prepares a SQL statement for execution.

The connectionId must be a valid active connection. The sql should be a parameterized SQL statement (e.g., 'SELECT * FROM users WHERE id = ?').

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}) =>
    _native.prepare(connectionId, sql, timeoutMs: timeoutMs);