@Test void dropTableMySQLStringTestMedium() { List<String> expected = Arrays.asList("TRUNCATE TABLE `table1`;", "TRUNCATE TABLE `products`;"); CleaningBuilder cleaningBuilder = new CleaningBuilder(new MySQLOptions()); assertThat(cleaningBuilder.buildQueries(pathsMedium.get(2))).isEqualTo(expected); }
@Override public List<String> buildQueries(Path path) { return path.getFixture().getTables().stream().map(table -> { StringBuilder truncateBuilder = new StringBuilder(); truncateBuilder.append("TRUNCATE TABLE "); truncateBuilder.append(getVendorOptions().escapeIdentifier(table.getSchema().getName())); truncateBuilder.append(";"); return truncateBuilder.toString(); }).collect(Collectors.toList()); }
CleaningBuilder extends QueryBuilder { @Override public List<String> buildQueries(Path path) { return path.getFixture().getTables().stream().map(table -> { StringBuilder truncateBuilder = new StringBuilder(); truncateBuilder.append("TRUNCATE TABLE "); truncateBuilder.append(getVendorOptions().escapeIdentifier(table.getSchema().getName())); truncateBuilder.append(";"); return truncateBuilder.toString(); }).collect(Collectors.toList()); } }
CleaningBuilder extends QueryBuilder { @Override public List<String> buildQueries(Path path) { return path.getFixture().getTables().stream().map(table -> { StringBuilder truncateBuilder = new StringBuilder(); truncateBuilder.append("TRUNCATE TABLE "); truncateBuilder.append(getVendorOptions().escapeIdentifier(table.getSchema().getName())); truncateBuilder.append(";"); return truncateBuilder.toString(); }).collect(Collectors.toList()); } CleaningBuilder(VendorOptions vendorOptions); }
CleaningBuilder extends QueryBuilder { @Override public List<String> buildQueries(Path path) { return path.getFixture().getTables().stream().map(table -> { StringBuilder truncateBuilder = new StringBuilder(); truncateBuilder.append("TRUNCATE TABLE "); truncateBuilder.append(getVendorOptions().escapeIdentifier(table.getSchema().getName())); truncateBuilder.append(";"); return truncateBuilder.toString(); }).collect(Collectors.toList()); } CleaningBuilder(VendorOptions vendorOptions); @Override List<String> buildQueries(Path path); }
CleaningBuilder extends QueryBuilder { @Override public List<String> buildQueries(Path path) { return path.getFixture().getTables().stream().map(table -> { StringBuilder truncateBuilder = new StringBuilder(); truncateBuilder.append("TRUNCATE TABLE "); truncateBuilder.append(getVendorOptions().escapeIdentifier(table.getSchema().getName())); truncateBuilder.append(";"); return truncateBuilder.toString(); }).collect(Collectors.toList()); } CleaningBuilder(VendorOptions vendorOptions); @Override List<String> buildQueries(Path path);  }