get method

Future<List<R>> get({
  1. ExecutionOptions options = const ExecutionOptions(),
})

Executes every chunk in one transaction and decodes the returned rows.

Decoding completes before the batch's owned transaction commits. Inside an existing transaction, let decoding errors escape if they must roll back.

Implementation

Future<List<R>> get({
  ExecutionOptions options = const ExecutionOptions(),
}) async {
  final plan = SelectionPlan();
  final decode = querySelection.bindSelection(plan);
  return _batch._run(
    selection: plan,
    options: options,
    complete: (db, result) => db.observeDecode(
      null,
      result.rows.length,
      () => [for (final row in result.rows) decode(row)],
    ),
  );
}