stream method

Stream<List<Object?>> stream(
  1. SqlCommand command, {
  2. int batchSize = 128,
  3. ExecutionOptions options = const ExecutionOptions(),
})

Streams raw rows, fetching at most batchSize rows per database request.

Listening holds a connection until completion or subscription cancellation. Outside a transaction, the stream owns a read transaction and rolls it back on early exit. Pausing the subscription prevents the next batch fetch; an asynchronous listen callback must explicitly pause for demand control.

Implementation

Stream<List<Object?>> stream(
  SqlCommand command, {
  int batchSize = 128,
  ExecutionOptions options = const ExecutionOptions(),
}) => streamRows(
  command,
  batchSize: batchSize,
  options: options,
  decode: (_, rows, _) async => rows,
);