private VertexLabel createVertexLabel(String vertexLabelName, Map<String, PropertyType> columns, ListOrderedSet<String> identifiers) { Preconditions.checkState(!this.isSqlgSchema(), "createVertexLabel may not be called for \"%s\"", SQLG_SCHEMA); Preconditions.checkArgument(!vertexLabelName.startsWith(VERTEX_PREFIX), "vertex label may not start with " + VERTEX_PREFIX); this.uncommittedRemovedVertexLabels.remove(this.name + "." + VERTEX_PREFIX + vertexLabelName); VertexLabel vertexLabel = VertexLabel.createVertexLabel(this.sqlgGraph, this, vertexLabelName, columns, identifiers); this.uncommittedVertexLabels.put(this.name + "." + VERTEX_PREFIX + vertexLabelName, vertexLabel); this.getTopology().fire(vertexLabel, "", TopologyChangeAction.CREATE); return vertexLabel; }
private VertexLabel createVertexLabel(String vertexLabelName, Map<String, PropertyType> columns, ListOrderedSet<String> identifiers) { Preconditions.checkState(!this.isSqlgSchema(), "createVertexLabel may not be called for \"%s\"", SQLG_SCHEMA); Preconditions.checkArgument(!vertexLabelName.startsWith(VERTEX_PREFIX), "vertex label may not start with " + VERTEX_PREFIX); this.uncommittedRemovedVertexLabels.remove(this.name + "." + VERTEX_PREFIX + vertexLabelName); VertexLabel vertexLabel = VertexLabel.createVertexLabel(this.sqlgGraph, this, vertexLabelName, columns, identifiers); this.uncommittedVertexLabels.put(this.name + "." + VERTEX_PREFIX + vertexLabelName, vertexLabel); this.getTopology().fire(vertexLabel, "", TopologyChangeAction.CREATE); return vertexLabel; }
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; }
private Partition createListPartition(String name, String in) { Preconditions.checkState(!this.getSchema().isSqlgSchema(), "createListPartition may not be called for \"%s\"", SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createListPartition(this.sqlgGraph, this, name, in); this.uncommittedPartitions.put(name, partition); this.getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createListPartition(String name, String in) { Preconditions.checkState(!this.getSchema().isSqlgSchema(), "createListPartition may not be called for \"%s\"", SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createListPartition(this.sqlgGraph, this, name, in); this.uncommittedPartitions.put(name, partition); this.getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createRangePartition(String name, String from, String to) { Preconditions.checkState(!this.getSchema().isSqlgSchema(), "createRangePartition may not be called for \"%s\"", SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createRangePartition(this.sqlgGraph, this, name, from, to); this.uncommittedPartitions.put(name, partition); this.getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createListPartitionWithSubPartition(String name, String in, PartitionType partitionType, String partitionExpression) { Preconditions.checkState(!this.getSchema().isSqlgSchema(), "createListPartitionWithSubPartition may not be called for \"%s\"", SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createListPartitionWithSubPartition(this.sqlgGraph, this, name, in, partitionType, partitionExpression); this.uncommittedPartitions.put(name, partition); this.getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createListPartitionWithSubPartition(String name, String in, PartitionType partitionType, String partitionExpression) { Preconditions.checkState(!this.getSchema().isSqlgSchema(), "createListPartitionWithSubPartition may not be called for \"%s\"", SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createListPartitionWithSubPartition(this.sqlgGraph, this, name, in, partitionType, partitionExpression); this.uncommittedPartitions.put(name, partition); this.getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createRangePartition(String name, String from, String to) { Preconditions.checkState(!this.getSchema().isSqlgSchema(), "createRangePartition may not be called for \"%s\"", SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createRangePartition(this.sqlgGraph, this, name, from, to); this.uncommittedPartitions.put(name, partition); this.getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createRangePartitionWithSubPartition(String name, String from, String to, PartitionType partitionType, String partitionExpression) { Preconditions.checkState(!this.getSchema().isSqlgSchema(), "createRangePartitionWithSubPartition may not be called for \"%s\"", SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createRangePartitionWithSubPartition(this.sqlgGraph, this, name, from, to, partitionType, partitionExpression); this.uncommittedPartitions.put(name, partition); this.getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createRangePartitionWithSubPartition(String name, String from, String to, PartitionType partitionType, String partitionExpression) { Preconditions.checkState(!this.getSchema().isSqlgSchema(), "createRangePartitionWithSubPartition may not be called for \"%s\"", SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createRangePartitionWithSubPartition(this.sqlgGraph, this, name, from, to, partitionType, partitionExpression); this.uncommittedPartitions.put(name, partition); this.getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createRangePartition(String name, String from, String to) { Preconditions.checkState(!this.getAbstractLabel().getSchema().isSqlgSchema(), "createSubPartition may not be called for \"%s\"", Topology.SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createRangeSubPartition(this.sqlgGraph, this, name, from, to); this.uncommittedPartitions.put(name, partition); this.getAbstractLabel().getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createRangePartition(String name, String from, String to) { Preconditions.checkState(!this.getAbstractLabel().getSchema().isSqlgSchema(), "createSubPartition may not be called for \"%s\"", Topology.SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createRangeSubPartition(this.sqlgGraph, this, name, from, to); this.uncommittedPartitions.put(name, partition); this.getAbstractLabel().getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createListPartition(String name, String in) { Preconditions.checkState(!this.getAbstractLabel().getSchema().isSqlgSchema(), "createSubPartition may not be called for \"%s\"", Topology.SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createListSubPartition(this.sqlgGraph, this, name, in); this.uncommittedPartitions.put(name, partition); this.getAbstractLabel().getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
private Partition createListPartition(String name, String in) { Preconditions.checkState(!this.getAbstractLabel().getSchema().isSqlgSchema(), "createSubPartition may not be called for \"%s\"", Topology.SQLG_SCHEMA); this.uncommittedPartitions.remove(name); Partition partition = Partition.createListSubPartition(this.sqlgGraph, this, name, in); this.uncommittedPartitions.put(name, partition); this.getAbstractLabel().getSchema().getTopology().fire(partition, "", TopologyChangeAction.CREATE); return partition; }
@Override void removeProperty(PropertyColumn propertyColumn, boolean preserveData) { this.getSchema().getTopology().lock(); if (!uncommittedRemovedProperties.contains(propertyColumn.getName())) { uncommittedRemovedProperties.add(propertyColumn.getName()); TopologyManager.removeVertexColumn(this.sqlgGraph, this.schema.getName(), VERTEX_PREFIX + getLabel(), propertyColumn.getName()); if (!preserveData) { removeColumn(this.schema.getName(), VERTEX_PREFIX + getLabel(), propertyColumn.getName()); } this.getSchema().getTopology().fire(propertyColumn, "", TopologyChangeAction.DELETE); } }
@Override void removeProperty(PropertyColumn propertyColumn, boolean preserveData) { this.getSchema().getTopology().lock(); if (!uncommittedRemovedProperties.contains(propertyColumn.getName())) { uncommittedRemovedProperties.add(propertyColumn.getName()); TopologyManager.removeVertexColumn(this.sqlgGraph, this.schema.getName(), VERTEX_PREFIX + getLabel(), propertyColumn.getName()); if (!preserveData) { removeColumn(this.schema.getName(), VERTEX_PREFIX + getLabel(), propertyColumn.getName()); } this.getSchema().getTopology().fire(propertyColumn, "", TopologyChangeAction.DELETE); } }
@Override void removeProperty(PropertyColumn propertyColumn, boolean preserveData) { this.getSchema().getTopology().lock(); if (!uncommittedRemovedProperties.contains(propertyColumn.getName())) { uncommittedRemovedProperties.add(propertyColumn.getName()); TopologyManager.removeEdgeColumn(this.sqlgGraph, this.getSchema().getName(), EDGE_PREFIX + getLabel(), propertyColumn.getName()); if (!preserveData) { removeColumn(this.getSchema().getName(), EDGE_PREFIX + getLabel(), propertyColumn.getName()); } this.getSchema().getTopology().fire(propertyColumn, "", TopologyChangeAction.DELETE); } }
@Override void removeProperty(PropertyColumn propertyColumn, boolean preserveData) { this.getSchema().getTopology().lock(); if (!uncommittedRemovedProperties.contains(propertyColumn.getName())) { uncommittedRemovedProperties.add(propertyColumn.getName()); TopologyManager.removeEdgeColumn(this.sqlgGraph, this.getSchema().getName(), EDGE_PREFIX + getLabel(), propertyColumn.getName()); if (!preserveData) { removeColumn(this.getSchema().getName(), EDGE_PREFIX + getLabel(), propertyColumn.getName()); } this.getSchema().getTopology().fire(propertyColumn, "", TopologyChangeAction.DELETE); } }