public Optional<PropertyColumn> getProperty(String key) { PropertyColumn propertyColumn = getProperties().get(key); if (propertyColumn != null) { return Optional.of(propertyColumn); } else { return Optional.empty(); } }
public Optional<PropertyColumn> getProperty(String key) { PropertyColumn propertyColumn = getProperties().get(key); if (propertyColumn != null) { return Optional.of(propertyColumn); } else { return Optional.empty(); } }
SchemaTable table = rootSchemaTableTree.getSchemaTable(); Map<String, PropertyColumn> properties = label.getProperties(); properties.keySet().retainAll(propertyKeys); .collect(joining(",\n\t", "\t", "\n"))); Map<String, PropertyType> propertyTypes = Maps.transformValues(label.getProperties(), PropertyColumn::getPropertyType); appendWhereClause(sql, propertyTypes, rootSchemaTableTree.getHasContainers());
void appendProperties(AbstractLabel edgeLabel, StringBuilder sql) { for (PropertyColumn propertyColumn : edgeLabel.getProperties().values()) { sql.append(", "); sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(propertyColumn.getName())); // additional columns for time zone, etc. String[] ps = propertyColumn.getPropertyType().getPostFixes(); if (ps != null) { for (String p : propertyColumn.getPropertyType().getPostFixes()) { sql.append(", "); sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(propertyColumn.getName() + p)); } } } }
void appendProperties(AbstractLabel edgeLabel, StringBuilder sql) { for (PropertyColumn propertyColumn : edgeLabel.getProperties().values()) { sql.append(", "); sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(propertyColumn.getName())); // additional columns for time zone, etc. String[] ps = propertyColumn.getPropertyType().getPostFixes(); if (ps != null) { for (String p : propertyColumn.getPropertyType().getPostFixes()) { sql.append(", "); sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(propertyColumn.getName() + p)); } } } }
.collect(joining(",\n\t", "\t", "\n"))); Map<String, PropertyType> propertyTypes = Maps.transformValues(label.getProperties(), PropertyColumn::getPropertyType); appendWhereClause(sql, propertyTypes, rootSchemaTableTree.getHasContainers());
.getSchema(this.schema).orElseThrow(() -> new IllegalStateException(String.format("Schema %s not found", this.schema))) .getVertexLabel(this.table).orElseThrow(() -> new IllegalStateException(String.format("VertexLabel %s not found", this.table))); properties = abstractLabel.getProperties(); } else { abstractLabel = this.sqlgGraph.getTopology() .getSchema(this.schema).orElseThrow(() -> new IllegalStateException(String.format("Schema %s not found", this.schema))) .getEdgeLabel(this.table).orElseThrow(() -> new IllegalStateException(String.format("EdgeLabel %s not found", this.table))); properties = abstractLabel.getProperties();
.getSchema(this.schema).orElseThrow(() -> new IllegalStateException(String.format("Schema %s not found", this.schema))) .getVertexLabel(this.table).orElseThrow(() -> new IllegalStateException(String.format("VertexLabel %s not found", this.table))); properties = abstractLabel.getProperties(); } else { abstractLabel = this.sqlgGraph.getTopology() .getSchema(this.schema).orElseThrow(() -> new IllegalStateException(String.format("Schema %s not found", this.schema))) .getEdgeLabel(this.table).orElseThrow(() -> new IllegalStateException(String.format("EdgeLabel %s not found", this.table))); properties = abstractLabel.getProperties();