Package org.umlg.sqlg.structure.topology
Class TopologyManager
java.lang.Object
org.umlg.sqlg.structure.topology.TopologyManager
Created by pieter on 2015/12/08.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addEdgeColumn
(SqlgGraph sqlgGraph, String schema, String prefixedTable, Map<String, PropertyDefinition> column, org.apache.commons.collections4.set.ListOrderedSet<String> primaryKeys) static org.apache.tinkerpop.gremlin.structure.Vertex
addEdgeLabel
(SqlgGraph sqlgGraph, String prefixedTable, Map<String, PropertyDefinition> columns, org.apache.commons.collections4.set.ListOrderedSet<String> identifiers, PartitionType partitionType, String partitionExpression) static void
addEdgeLabelPartition
(SqlgGraph sqlgGraph, String schema, String abstractLabel, String name, Integer modulus, Integer remainder, PartitionType partitionType, String partitionExpression) static void
addEdgeLabelPartition
(SqlgGraph sqlgGraph, String schema, String abstractLabel, String name, String from, String to, PartitionType partitionType, String partitionExpression) static void
addEdgeLabelPartition
(SqlgGraph sqlgGraph, String schema, String abstractLabel, String name, String in, PartitionType partitionType, String partitionExpression) static void
addEdgeLabelPartition
(SqlgGraph sqlgGraph, AbstractLabel abstractLabel, String name, Integer modulus, Integer remainder, PartitionType partitionType, String partitionExpression) static void
addEdgeLabelPartition
(SqlgGraph sqlgGraph, AbstractLabel abstractLabel, String name, String from, String to, PartitionType partitionType, String partitionExpression) static void
addEdgeLabelPartition
(SqlgGraph sqlgGraph, AbstractLabel abstractLabel, String name, String in, PartitionType partitionType, String partitionExpression) static void
static void
addIndex
(SqlgGraph sqlgGraph, String schema, String label, boolean vertex, String index, IndexType indexType, List<String> properties) add an index from information schemastatic void
static void
addLabelToEdge
(SqlgGraph sqlgGraph, String schema, String prefixedTable, boolean in, SchemaTable foreignKey, EdgeDefinition edgeDefinition) static void
addLabelToEdgeFromInformationSchema
(SqlgGraph sqlgGraph, org.apache.tinkerpop.gremlin.structure.Vertex edgeVertex, String schema, String prefixedTable, boolean in, SchemaTable foreignKey) static void
static void
addSubPartition
(SqlgGraph sqlgGraph, boolean isSubSubPartition, boolean isVertexLabel, String schema, String abstractLabel, String partitionParent, String partitionName, PartitionType partitionType, String partitionExpression, String from, String to, String in, Integer modulus, Integer remainder) static void
addSubPartition
(SqlgGraph sqlgGraph, Partition partition) Adds the partition to a partition.static void
addVertexColumn
(SqlgGraph sqlgGraph, String schema, String prefixedTable, Map.Entry<String, PropertyDefinition> column) static void
addVertexLabel
(SqlgGraph sqlgGraph, String schema, String tableName, Map<String, PropertyDefinition> columns, org.apache.commons.collections4.set.ListOrderedSet<String> identifiers) static void
addVertexLabel
(SqlgGraph sqlgGraph, String schema, String tableName, Map<String, PropertyDefinition> columns, org.apache.commons.collections4.set.ListOrderedSet<String> identifiers, PartitionType partitionType, String partitionExpression) static void
addVertexLabelPartition
(SqlgGraph sqlgGraph, String schema, String abstractLabel, String name, Integer modulus, Integer remainder, PartitionType partitionType, String partitionExpression) static void
addVertexLabelPartition
(SqlgGraph sqlgGraph, String schema, String abstractLabel, String name, String from, String to, PartitionType partitionType, String partitionExpression) static void
addVertexLabelPartition
(SqlgGraph sqlgGraph, String schema, String abstractLabel, String name, String in, PartitionType partitionType, String partitionExpression) static void
removeEdgeColumn
(SqlgGraph sqlgGraph, String schema, String prefixedTable, String column) static void
removeEdgeLabel
(SqlgGraph sqlgGraph, EdgeLabel edge) static void
removeIndex
(SqlgGraph sqlgGraph, Index index) static void
removeInEdgeRole
(SqlgGraph sqlgGraph, EdgeLabel edgeLabel, VertexLabel vertexLabel) static void
removeOutEdgeRole
(SqlgGraph sqlgGraph, EdgeLabel edgeLabel, VertexLabel vertexLabel) static void
removePartition
(SqlgGraph sqlgGraph, Partition partition) static void
removeSchema
(SqlgGraph sqlgGraph, String schema) static void
removeVertexColumn
(SqlgGraph sqlgGraph, String schema, String prefixedTable, String column) static void
removeVertexLabel
(SqlgGraph sqlgGraph, VertexLabel vertexLabel) static void
renameEdgeLabel
(SqlgGraph sqlgGraph, String schema, String oldEdgeLabel, String newEdgeLabel) static void
renameVertexLabel
(SqlgGraph sqlgGraph, String schema, String oldVertexLabel, String newVertexLabel) static void
updateEdgeLabelPartitionTypeAndExpression
(SqlgGraph sqlgGraph, String schema, String name, PartitionType partitionType, String partitionExpression) static String
updateGraph
(SqlgGraph sqlgGraph, String version) Updates sqlg_schema.V_graph's version to the new version and returns the old version.static void
updateVertexLabelPartitionTypeAndExpression
(SqlgGraph sqlgGraph, String schema, String name, PartitionType partitionType, String partitionExpression)
-
Method Details
-
addGraph
-
updateGraph
Updates sqlg_schema.V_graph's version to the new version and returns the old version.- Parameters:
sqlgGraph
- The graph.version
- The new version.- Returns:
- The old version.
-
addSchema
-
removeSchema
-
addVertexLabel
-
addVertexLabel
public static void addVertexLabel(SqlgGraph sqlgGraph, String schema, String tableName, Map<String, PropertyDefinition> columns, org.apache.commons.collections4.set.ListOrderedSet<String> identifiers, PartitionType partitionType, String partitionExpression) -
renameVertexLabel
-
renameEdgeLabel
-
removeVertexLabel
-
addVertexLabelPartition
-
addVertexLabelPartition
-
addVertexLabelPartition
-
addEdgeLabelPartition
public static void addEdgeLabelPartition(SqlgGraph sqlgGraph, AbstractLabel abstractLabel, String name, String from, String to, PartitionType partitionType, String partitionExpression) -
addEdgeLabelPartition
-
addEdgeLabelPartition
public static void addEdgeLabelPartition(SqlgGraph sqlgGraph, AbstractLabel abstractLabel, String name, String in, PartitionType partitionType, String partitionExpression) -
addEdgeLabelPartition
public static void addEdgeLabelPartition(SqlgGraph sqlgGraph, AbstractLabel abstractLabel, String name, Integer modulus, Integer remainder, PartitionType partitionType, String partitionExpression) -
addEdgeLabelPartition
-
addEdgeLabelPartition
-
addEdgeLabel
public static org.apache.tinkerpop.gremlin.structure.Vertex addEdgeLabel(SqlgGraph sqlgGraph, String prefixedTable, Map<String, PropertyDefinition> columns, org.apache.commons.collections4.set.ListOrderedSet<String> identifiers, PartitionType partitionType, String partitionExpression) -
removeEdgeLabel
-
removeOutEdgeRole
public static void removeOutEdgeRole(SqlgGraph sqlgGraph, EdgeLabel edgeLabel, VertexLabel vertexLabel) -
removeInEdgeRole
public static void removeInEdgeRole(SqlgGraph sqlgGraph, EdgeLabel edgeLabel, VertexLabel vertexLabel) -
addLabelToEdge
public static void addLabelToEdge(SqlgGraph sqlgGraph, String schema, String prefixedTable, boolean in, SchemaTable foreignKey, EdgeDefinition edgeDefinition) -
addLabelToEdgeFromInformationSchema
public static void addLabelToEdgeFromInformationSchema(SqlgGraph sqlgGraph, org.apache.tinkerpop.gremlin.structure.Vertex edgeVertex, String schema, String prefixedTable, boolean in, SchemaTable foreignKey) -
addVertexColumn
-
removeVertexColumn
-
removeEdgeColumn
-
addIndex
-
removeIndex
-
addIndex
public static void addIndex(SqlgGraph sqlgGraph, String schema, String label, boolean vertex, String index, IndexType indexType, List<String> properties) add an index from information schema- Parameters:
sqlgGraph
- the graphschema
- the schema namelabel
- the label namevertex
- is it a vertex or an edge label?index
- the index nameindexType
- index typeproperties
- the column names
-
addEdgeColumn
-
removePartition
-
addSubPartition
Adds the partition to a partition. A new Vertex with label Partition is added and in linked to its parent with the SQLG_SCHEMA_PARTITION_PARTITION_EDGE edge label.- Parameters:
sqlgGraph
- The graph.
-
addSubPartition
public static void addSubPartition(SqlgGraph sqlgGraph, boolean isSubSubPartition, boolean isVertexLabel, String schema, String abstractLabel, String partitionParent, String partitionName, PartitionType partitionType, String partitionExpression, String from, String to, String in, Integer modulus, Integer remainder) -
updateVertexLabelPartitionTypeAndExpression
public static void updateVertexLabelPartitionTypeAndExpression(SqlgGraph sqlgGraph, String schema, String name, PartitionType partitionType, String partitionExpression) -
updateEdgeLabelPartitionTypeAndExpression
public static void updateEdgeLabelPartitionTypeAndExpression(SqlgGraph sqlgGraph, String schema, String name, PartitionType partitionType, String partitionExpression)
-