/** * Returns the set of table ids included in the current filter configuration. */ public Set<TableId> tableIds() { // TODO that filtering should really be done once upon insertion return tables.subset(tableFilter).tableIds(); }
throws SQLException { Set<TableId> tableIdsBefore = new HashSet<>(tables.tableIds());
@FixFor("DBZ-990") @Test public void shouldParseEngineNameWithApostrophes() { String ddl = "CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE 'InnoDB'" + "CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE `InnoDB`" + "CREATE TABLE t3 (id INT PRIMARY KEY) ENGINE \"InnoDB\"" + "CREATE TABLE t4 (id INT PRIMARY KEY) ENGINE `RocksDB`"; parser.parse(ddl, tables); assertThat(tables.size()).isEqualTo(4); assertThat(tables.tableIds() .stream() .map(TableId::table) .collect(Collectors.toSet())) .containsOnly("t1", "t2", "t3", "t4"); }
/** * Returns the set of table ids included in the current filter configuration. */ public Set<TableId> tableIds() { // TODO that filtering should really be done once upon insertion return tables.subset(tableFilter).tableIds(); }
throws SQLException { Set<TableId> tableIdsBefore = new HashSet<>(tables.tableIds());
@FixFor("DBZ-990") @Test public void shouldParseEngineNameWithApostrophes() { String ddl = "CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE 'InnoDB'" + "CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE `InnoDB`" + "CREATE TABLE t3 (id INT PRIMARY KEY) ENGINE \"InnoDB\"" + "CREATE TABLE t4 (id INT PRIMARY KEY) ENGINE `RocksDB`"; parser.parse(ddl, tables); assertThat(tables.size()).isEqualTo(4); assertThat(tables.tableIds() .stream() .map(TableId::table) .collect(Collectors.toSet())) .containsOnly("t1", "t2", "t3", "t4"); }
Set<TableId> tableIds = new HashSet<>(tables.tableIds());