streamQueryNamed method

  1. @override
Stream<Result<QueryResult>> streamQueryNamed(
  1. String connectionId,
  2. String sql,
  3. Map<String, Object?> namedParams, {
  4. int fetchSize = 1000,
  5. int? chunkSize,
})
override

Executes a named-parameter query and returns results as a stream.

Supports @name and :name syntax. When the native library exports odbc_stream_start_batched_params, results stream in batches. Older binaries fall back to a single buffered QueryResult chunk. On failure, emits a single Failure item and closes the stream.

Implementation

@override
Stream<Result<QueryResult>> streamQueryNamed(
  String connectionId,
  String sql,
  Map<String, Object?> namedParams, {
  int fetchSize = 1000,
  int? chunkSize,
}) =>
    _query.streamQueryNamed(
      connectionId,
      sql,
      namedParams,
      fetchSize: fetchSize,
      chunkSize: chunkSize,
    );