prepare method

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

Prepares sql on connectionId in the worker.

timeoutMs is the statement execution timeout (0 = no limit). Returns the statement ID on success.

Implementation

Future<int> prepare(int connectionId, String sql, {int timeoutMs = 0}) async {
  final r = await _sendRequest<IntResponse>(
    PrepareRequest(_nextRequestId(), connectionId, sql, timeoutMs: timeoutMs),
  );
  return r.value;
}