rawInsertAndTrigger method

  1. @override
Future<int> rawInsertAndTrigger(
  1. Iterable<String> tables,
  2. String sql, [
  3. List<Object?>? arguments
])
override

See rawInsert

Execute a raw SQL INSERT query.

Returns the last inserted record id.

A notification to queries for tables will be sent after the statement is executed and the insert was successful.

Implementation

@override
Future<int> rawInsertAndTrigger(
  Iterable<String> tables,
  String sql, [
  List<Object?>? arguments,
]) async {
  final id = await rawInsert(sql, arguments);
  if (id != -1) {
    sendTableTrigger(tables);
  }
  return id;
}