public static void addEdgeColumn(SqlgGraph sqlgGraph, String schema, String prefixedTable, Map<String, PropertyType> column, ListOrderedSet<String> primaryKeys) { for (Map.Entry<String, PropertyType> stringPropertyTypeEntry : column.entrySet()) { addEdgeColumn(sqlgGraph, schema, prefixedTable, stringPropertyTypeEntry, primaryKeys); } }
public static void addEdgeColumn(SqlgGraph sqlgGraph, String schema, String prefixedTable, Map<String, PropertyType> column, ListOrderedSet<String> primaryKeys) { for (Map.Entry<String, PropertyType> stringPropertyTypeEntry : column.entrySet()) { addEdgeColumn(sqlgGraph, schema, prefixedTable, stringPropertyTypeEntry, primaryKeys); } }
public void ensurePropertiesExist(Map<String, PropertyType> columns) { for (Map.Entry<String, PropertyType> column : columns.entrySet()) { if (!this.properties.containsKey(column.getKey())) { Preconditions.checkState(!this.getSchema().isSqlgSchema(), "schema may not be %s", SQLG_SCHEMA); if (!this.uncommittedProperties.containsKey(column.getKey())) { this.getSchema().getTopology().lock(); if (!getProperty(column.getKey()).isPresent()) { TopologyManager.addEdgeColumn(this.sqlgGraph, this.getSchema().getName(), EDGE_PREFIX + getLabel(), column, new ListOrderedSet<>()); addColumn(this.getSchema().getName(), EDGE_PREFIX + getLabel(), ImmutablePair.of(column.getKey(), column.getValue())); PropertyColumn propertyColumn = new PropertyColumn(this, column.getKey(), column.getValue()); propertyColumn.setCommitted(false); this.uncommittedProperties.put(column.getKey(), propertyColumn); this.getSchema().getTopology().fire(propertyColumn, "", TopologyChangeAction.CREATE); } } } } }
public void ensurePropertiesExist(Map<String, PropertyType> columns) { for (Map.Entry<String, PropertyType> column : columns.entrySet()) { if (!this.properties.containsKey(column.getKey())) { Preconditions.checkState(!this.getSchema().isSqlgSchema(), "schema may not be %s", SQLG_SCHEMA); if (!this.uncommittedProperties.containsKey(column.getKey())) { this.getSchema().getTopology().lock(); if (!getProperty(column.getKey()).isPresent()) { TopologyManager.addEdgeColumn(this.sqlgGraph, this.getSchema().getName(), EDGE_PREFIX + getLabel(), column, new ListOrderedSet<>()); addColumn(this.getSchema().getName(), EDGE_PREFIX + getLabel(), ImmutablePair.of(column.getKey(), column.getValue())); PropertyColumn propertyColumn = new PropertyColumn(this, column.getKey(), column.getValue()); propertyColumn.setCommitted(false); this.uncommittedProperties.put(column.getKey(), propertyColumn); this.getSchema().getTopology().fire(propertyColumn, "", TopologyChangeAction.CREATE); } } } } }
TopologyManager.addEdgeColumn(this.sqlgGraph, schema, table, columns, ListOrderedSet.listOrderedSet(primaryKeys)); String label = table.substring(Topology.EDGE_PREFIX.length()); if (indices != null) {
TopologyManager.addEdgeColumn(this.sqlgGraph, schema, table, columns, ListOrderedSet.listOrderedSet(primaryKeys)); String label = table.substring(Topology.EDGE_PREFIX.length()); if (indices != null) {