private Index createIndex(String indexName, IndexType indexType, List<PropertyColumn> properties) { Index index = Index.createIndex(this.sqlgGraph, this, indexName, indexType, properties); this.uncommittedIndexes.put(indexName, index); this.getSchema().getTopology().fire(index, "", TopologyChangeAction.CREATE); return index; }
private Index createIndex(String indexName, IndexType indexType, List<PropertyColumn> properties) { Index index = Index.createIndex(this.sqlgGraph, this, indexName, indexType, properties); this.uncommittedIndexes.put(indexName, index); this.getSchema().getTopology().fire(index, "", TopologyChangeAction.CREATE); return index; }
indexName = Index.generateName(this.sqlgGraph.getSqlDialect()); index.createIndex(this.sqlgGraph, SchemaTable.of(getAbstractLabel().getSchema().getName(), this.getName()), indexName);
indexName = Index.generateName(this.sqlgGraph.getSqlDialect()); index.createIndex(this.sqlgGraph, SchemaTable.of(getAbstractLabel().getSchema().getName(), this.getName()), indexName);
public void createIndexOnLeafPartitions(Index index) { if (this.partitionType.isNone()) { //Append the partition name to the index name. String indexName = index.getName() + "_" + this.getName(); if (indexName.length() > this.sqlgGraph.getSqlDialect().getMaximumIndexNameLength()) { indexName = Index.generateName(this.sqlgGraph.getSqlDialect()); } index.createIndex(this.sqlgGraph, SchemaTable.of(getAbstractLabel().getSchema().getName(), this.getName()), indexName); } else { for (Partition partition : this.partitions.values()) { partition.createIndexOnLeafPartitions(index); } } }
public void createIndexOnLeafPartitions(Index index) { if (this.partitionType.isNone()) { //Append the partition name to the index name. String indexName = index.getName() + "_" + this.getName(); if (indexName.length() > this.sqlgGraph.getSqlDialect().getMaximumIndexNameLength()) { indexName = Index.generateName(this.sqlgGraph.getSqlDialect()); } index.createIndex(this.sqlgGraph, SchemaTable.of(getAbstractLabel().getSchema().getName(), this.getName()), indexName); } else { for (Partition partition : this.partitions.values()) { partition.createIndexOnLeafPartitions(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; }
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; }