/** * Returns a {@link com.englishtown.vertx.cassandra.tablebuilder.DropTable} statement * * @param keyspace the keyspace for the table to create * @param table the table name * @return the drop table builder */ public static DropTable drop(String keyspace, String table) { return new DropTable(keyspace, table); }
@Test public void testIfExists() throws Exception { DropTable table = TableBuilder.drop("test_keyspace", "test_table").ifExists(); String cql = table.getQueryString(); assertEquals("DROP TABLE IF EXISTS test_keyspace.test_table", cql); }
if (keyspaceMetadata != null) { for (TableMetadata tableMetadata : keyspaceMetadata.getTables()) { session.execute(TableBuilder.drop(keyspace, tableMetadata.getName()).ifExists());
@Test public void testDropTable() throws Exception { DropTable table = TableBuilder.drop("test_keyspace", "test_table"); String cql = table.getQueryString(); assertEquals("DROP TABLE test_keyspace.test_table", cql); }
.ifExists(); session.execute(statement);
/** * Returns a {@link com.englishtown.vertx.cassandra.tablebuilder.DropTable} statement * * @param keyspace the keyspace for the table to create * @param table the table name * @return the drop table builder */ public static DropTable drop(String keyspace, String table) { return new DropTable(keyspace, table); }
/** * Returns a {@link com.englishtown.vertx.cassandra.tablebuilder.DropTable} statement * * @param keyspace the keyspace for the table to create * @param table the table name * @return the drop table builder */ public static DropTable drop(String keyspace, String table) { return new DropTable(keyspace, table); }