notify method

Future<void> notify(
  1. String channel, [
  2. String payload = '',
  3. String? connection
])

Wakes the notifications listeners of channel, on every machine connected to the database (PostgreSQL's NOTIFY; inside a transaction it is sent at commit). Nothing on databases without notifications.

Implementation

Future<void> notify(
  String channel, [
  String payload = '',
  String? connection,
]) async {
  if (dialectOf(connection) == .postgres) {
    await select('SELECT pg_notify(?, ?)', [channel, payload], connection);
  }
}