setTriggerSetting method

  1. @override
String setTriggerSetting(
  1. QualifiedTablename table,
  2. int value
)
override

Modifies the trigger setting for the table identified by its tablename and namespace.

Implementation

@override
String setTriggerSetting(QualifiedTablename table, int value) {
  final tableName = table.tablename;
  final namespace = table.namespace;

  return '''
INSERT INTO "$namespace"."_electric_trigger_settings" ("namespace", "tablename", "flag")
VALUES ('$namespace', '$tableName', $value)
ON CONFLICT DO NOTHING;
''';
}