use of com.datastax.oss.driver.internal.core.metadata.schema.queries.SchemaRows in project java-driver by datastax.
the class TableParserTest method should_parse_modern_tables.
@Test
public void should_parse_modern_tables() {
SchemaRows rows = modernRows(TABLE_ROW_3_0, COLUMN_ROWS_3_0, INDEX_ROWS_3_0);
TableParser parser = new TableParser(rows, context);
TableMetadata table = parser.parseTable(TABLE_ROW_3_0, KEYSPACE_ID, Collections.emptyMap());
checkTable(table);
@SuppressWarnings("unchecked") Map<String, String> caching = (Map<String, String>) table.getOptions().get(CqlIdentifier.fromInternal("caching"));
assertThat(caching).hasSize(2).containsEntry("keys", "ALL").containsEntry("rows_per_partition", "NONE");
}
use of com.datastax.oss.driver.internal.core.metadata.schema.queries.SchemaRows in project java-driver by datastax.
the class ViewParserTest method should_skip_when_no_column_rows.
@Test
public void should_skip_when_no_column_rows() {
SchemaRows rows = rows(VIEW_ROW_3_0, Collections.emptyList());
ViewParser parser = new ViewParser(rows, context);
ViewMetadata view = parser.parseView(VIEW_ROW_3_0, KEYSPACE_ID, Collections.emptyMap());
assertThat(view).isNull();
}
Aggregations