if (!this.sqlDialect.isSystemIndex(lastIndexName)) { if (!Schema.GLOBAL_UNIQUE_INDEX_SCHEMA.equals(schema)) { TopologyManager.addIndex(sqlgGraph, schema, label, isVertex, lastIndexName, lastIndexType, lastColumns); TopologyManager.addIndex(sqlgGraph, schema, label, isVertex, lastIndexName, lastIndexType, lastColumns);
if (!this.sqlDialect.isSystemIndex(lastIndexName)) { if (!Schema.GLOBAL_UNIQUE_INDEX_SCHEMA.equals(schema)) { TopologyManager.addIndex(sqlgGraph, schema, label, isVertex, lastIndexName, lastIndexType, lastColumns); TopologyManager.addIndex(sqlgGraph, schema, label, isVertex, lastIndexName, lastIndexType, lastColumns);
if (idxs != null) { for (IndexRef ir : idxs) { TopologyManager.addIndex(sqlgGraph, schema, label, true, ir.getIndexName(), ir.getIndexType(), ir.getColumns()); if (idxs != null) { for (IndexRef ir : idxs) { TopologyManager.addIndex(sqlgGraph, schema, label, false, ir.getIndexName(), ir.getIndexType(), ir.getColumns());
static Index createIndex(SqlgGraph sqlgGraph, AbstractLabel abstractLabel, String indexName, IndexType indexType, List<PropertyColumn> properties) { Index index = new Index(indexName, indexType, abstractLabel, properties); SchemaTable schemaTable = SchemaTable.of(abstractLabel.getSchema().getName(), abstractLabel.getLabel()); //For partitioned tables the index is on each partition. //It is created when the partition is created. if (!abstractLabel.isPartition()) { String prefix = abstractLabel instanceof VertexLabel ? VERTEX_PREFIX : EDGE_PREFIX; index.createIndex(sqlgGraph, schemaTable.withPrefix(prefix), index.getName()); } else { for (Partition partition : abstractLabel.getPartitions().values()) { partition.createIndexOnLeafPartitions(index); } } TopologyManager.addIndex(sqlgGraph, index); index.committed = false; return index; }
static Index createIndex(SqlgGraph sqlgGraph, AbstractLabel abstractLabel, String indexName, IndexType indexType, List<PropertyColumn> properties) { Index index = new Index(indexName, indexType, abstractLabel, properties); SchemaTable schemaTable = SchemaTable.of(abstractLabel.getSchema().getName(), abstractLabel.getLabel()); //For partitioned tables the index is on each partition. //It is created when the partition is created. if (!abstractLabel.isPartition()) { String prefix = abstractLabel instanceof VertexLabel ? VERTEX_PREFIX : EDGE_PREFIX; index.createIndex(sqlgGraph, schemaTable.withPrefix(prefix), index.getName()); } else { for (Partition partition : abstractLabel.getPartitions().values()) { partition.createIndexOnLeafPartitions(index); } } TopologyManager.addIndex(sqlgGraph, index); index.committed = false; return index; }
if (idxs != null) { for (IndexRef ir : idxs) { TopologyManager.addIndex(sqlgGraph, schema, label, true, ir.getIndexName(), ir.getIndexType(), ir.getColumns()); if (idxs != null) { for (IndexRef ir : idxs) { TopologyManager.addIndex(sqlgGraph, schema, label, false, ir.getIndexName(), ir.getIndexType(), ir.getColumns());