streamStart method

int streamStart(
  1. int connectionId,
  2. String sql, {
  3. int chunkSize = _defaultStreamChunkSize,
})

Starts a streaming query.

The connectionId must be a valid active connection. The sql should be a valid SQL SELECT statement. The chunkSize specifies how many rows to fetch per chunk.

Returns a stream ID on success, 0 on failure.

Implementation

int streamStart(
  int connectionId,
  String sql, {
  int chunkSize = _defaultStreamChunkSize,
}) {
  return _withSql<int>(
        sql,
        (sqlPtr) => _bindings.odbc_stream_start(
          connectionId,
          sqlPtr,
          chunkSize,
        ),
      ) ??
      0;
}