use of com.datastax.dse.driver.internal.core.metadata.schema.DefaultDseIndexMetadata in project java-driver by datastax.
the class DseTableParser method buildModernIndex.
// In C*>=3.0, index information is stored in a dedicated table:
// CREATE TABLE system_schema.indexes (
// keyspace_name text,
// table_name text,
// index_name text,
// kind text,
// options frozen<map<text, text>>,
// PRIMARY KEY (keyspace_name, table_name, index_name)
// ) WITH CLUSTERING ORDER BY (table_name ASC, index_name ASC)
private DseIndexMetadata buildModernIndex(CqlIdentifier keyspaceId, CqlIdentifier tableId, AdminRow row) {
CqlIdentifier name = CqlIdentifier.fromInternal(row.getString("index_name"));
IndexKind kind = IndexKind.valueOf(row.getString("kind"));
Map<String, String> options = row.getMapOfStringToString("options");
String target = options.get("target");
return new DefaultDseIndexMetadata(keyspaceId, tableId, name, kind, target, options);
}
Aggregations