get method

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

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

Decoding happens after the batch executes. Use an enclosing transaction when a decoding exception must roll back the inserted data.

Implementation

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