customStatement method

void customStatement(
  1. String sql, [
  2. List? args,
  3. Iterable<TableUpdate> updates = const Iterable.empty()
])

Executes the custom sql statement with variables instantiated to args.

The statement will be added to this batch and executed when the batch completes. So, this method returns synchronously and it's not possible to inspect the return value of individual statements.

See also:

Implementation

void customStatement(
  String sql, [
  List<dynamic>? args,
  Iterable<TableUpdate> updates = const Iterable.empty(),
]) {
  _addSqlAndArguments(sql, args ?? const []);
  _createdUpdates.addAll(updates);
}