@Test public void testCreateTable() throws Exception { CreateTable table = TableBuilder.create("test_keyspace", "test_table") .ifNotExists() .column("col1", "text") .column("col2", "int") .staticColumn("col3", "blob") .primaryKeys("col1", "col2"); String cql = table.getQueryString(); assertEquals("CREATE TABLE IF NOT EXISTS test_keyspace.test_table (col1 text, col2 int, col3 blob STATIC, PRIMARY KEY(col1, col2))", cql); }
.ifNotExists() .column("id", "text") .column("value", "text")
.ifNotExists() .column("col1", "text") .column("col2", "text")