use of org.apache.ignite.internal.schema.SchemaRegistry in project ignite-3 by apache.
the class JdbcMetadataCatalog method createPrimaryKeyMeta.
/**
* Creates primary key metadata from table object.
*
* @param tbl Table.
* @return Jdbc primary key metadata.
*/
private JdbcPrimaryKeyMeta createPrimaryKeyMeta(Table tbl) {
String schemaName = getTblSchema(tbl.name());
String tblName = getTblName(tbl.name());
final String keyName = PK + tblName;
SchemaRegistry registry = ((TableImpl) tbl).schemaView();
List<String> keyColNames = Arrays.stream(registry.schema().keyColumns().columns()).map(Column::name).collect(Collectors.toList());
return new JdbcPrimaryKeyMeta(schemaName, tblName, keyName, keyColNames);
}
Aggregations