filterTablesTransformer static method

Filter an update stream by specific tables.

Implementation

static StreamTransformer<UpdateNotification, UpdateNotification>
    filterTablesTransformer(Iterable<String> tables) {
  Set<String> normalized = {for (var table in tables) table.toLowerCase()};
  return StreamTransformer.fromBind(
      (source) => source.where((data) => data.containsAny(normalized)));
}