public static void addVertexLabel(SqlgGraph sqlgGraph, String schema, String tableName, Map<String, PropertyType> columns, ListOrderedSet<String> identifiers) { addVertexLabel(sqlgGraph, schema, tableName, columns, identifiers, PartitionType.NONE, null); }
public static void addVertexLabel(SqlgGraph sqlgGraph, String schema, String tableName, Map<String, PropertyType> columns, ListOrderedSet<String> identifiers) { addVertexLabel(sqlgGraph, schema, tableName, columns, identifiers, PartitionType.NONE, null); }
static VertexLabel createPartitionedVertexLabel( SqlgGraph sqlgGraph, Schema schema, String label, Map<String, PropertyType> columns, ListOrderedSet<String> identifiers, PartitionType partitionType, String partitionExpression) { Preconditions.checkArgument(!schema.isSqlgSchema(), "createVertexLabel may not be called for \"%s\"", SQLG_SCHEMA); Preconditions.checkArgument(partitionType != PartitionType.NONE, "PartitionType must be RANGE or LIST. Found NONE."); Preconditions.checkArgument(!StringUtils.isEmpty(partitionExpression), "partitionExpression may not be null or empty when creating a partitioned vertex label."); Preconditions.checkArgument(!identifiers.isEmpty(), "Partitioned label must have at least one identifier."); VertexLabel vertexLabel = new VertexLabel(schema, label, columns, identifiers, partitionType, partitionExpression); vertexLabel.createPartitionedVertexLabelOnDb(columns, identifiers); TopologyManager.addVertexLabel(sqlgGraph, schema.getName(), label, columns, identifiers, partitionType, partitionExpression); vertexLabel.committed = false; return vertexLabel; }
static VertexLabel createVertexLabel(SqlgGraph sqlgGraph, Schema schema, String label, Map<String, PropertyType> columns, ListOrderedSet<String> identifiers) { Preconditions.checkArgument(!schema.isSqlgSchema(), "createVertexLabel may not be called for \"%s\"", SQLG_SCHEMA); VertexLabel vertexLabel = new VertexLabel(schema, label, columns, identifiers); vertexLabel.createVertexLabelOnDb(columns, identifiers); TopologyManager.addVertexLabel(sqlgGraph, schema.getName(), label, columns, identifiers); vertexLabel.committed = false; return vertexLabel; }
static VertexLabel createPartitionedVertexLabel( SqlgGraph sqlgGraph, Schema schema, String label, Map<String, PropertyType> columns, ListOrderedSet<String> identifiers, PartitionType partitionType, String partitionExpression) { Preconditions.checkArgument(!schema.isSqlgSchema(), "createVertexLabel may not be called for \"%s\"", SQLG_SCHEMA); Preconditions.checkArgument(partitionType != PartitionType.NONE, "PartitionType must be RANGE or LIST. Found NONE."); Preconditions.checkArgument(!StringUtils.isEmpty(partitionExpression), "partitionExpression may not be null or empty when creating a partitioned vertex label."); Preconditions.checkArgument(!identifiers.isEmpty(), "Partitioned label must have at least one identifier."); VertexLabel vertexLabel = new VertexLabel(schema, label, columns, identifiers, partitionType, partitionExpression); vertexLabel.createPartitionedVertexLabelOnDb(columns, identifiers); TopologyManager.addVertexLabel(sqlgGraph, schema.getName(), label, columns, identifiers, partitionType, partitionExpression); vertexLabel.committed = false; return vertexLabel; }
static VertexLabel createVertexLabel(SqlgGraph sqlgGraph, Schema schema, String label, Map<String, PropertyType> columns, ListOrderedSet<String> identifiers) { Preconditions.checkArgument(!schema.isSqlgSchema(), "createVertexLabel may not be called for \"%s\"", SQLG_SCHEMA); VertexLabel vertexLabel = new VertexLabel(schema, label, columns, identifiers); vertexLabel.createVertexLabelOnDb(columns, identifiers); TopologyManager.addVertexLabel(sqlgGraph, schema.getName(), label, columns, identifiers); vertexLabel.committed = false; return vertexLabel; }
List<String> primaryKeys = this.sqlDialect.getPrimaryKeys(metadata, tblCat, schema, table); if (primaryKeys.size() == 1 && primaryKeys.get(0).equals(Topology.ID)) { TopologyManager.addVertexLabel(this.sqlgGraph, schema, label, columns, new ListOrderedSet<>()); } else { TopologyManager.addVertexLabel(this.sqlgGraph, schema, label, columns, identifiers); } else { TopologyManager.addVertexLabel(this.sqlgGraph, schema, label, columns, ListOrderedSet.listOrderedSet(primaryKeys));
List<String> primaryKeys = this.sqlDialect.getPrimaryKeys(metadata, tblCat, schema, table); if (primaryKeys.size() == 1 && primaryKeys.get(0).equals(Topology.ID)) { TopologyManager.addVertexLabel(this.sqlgGraph, schema, label, columns, new ListOrderedSet<>()); } else { TopologyManager.addVertexLabel(this.sqlgGraph, schema, label, columns, identifiers); } else { TopologyManager.addVertexLabel(this.sqlgGraph, schema, label, columns, ListOrderedSet.listOrderedSet(primaryKeys));