use of org.neo4j.values.virtual.MapValueBuilder in project neo4j by neo4j.
the class CypherFunctions method asPoint.
private static Value asPoint(DbAccess access, VirtualRelationshipValue relationshipValue, RelationshipScanCursor relationshipScanCursor, PropertyCursor propertyCursor) {
MapValueBuilder builder = new MapValueBuilder();
for (String key : POINT_KEYS) {
Value value = access.relationshipProperty(relationshipValue.id(), access.propertyKey(key), relationshipScanCursor, propertyCursor, true);
if (value == NO_VALUE) {
continue;
}
builder.add(key, value);
}
return PointValue.fromMap(builder.build());
}
use of org.neo4j.values.virtual.MapValueBuilder in project neo4j by neo4j.
the class LiteralInterpreter method asMapValue.
private static MapValue asMapValue(Map<String, ?> map) {
int size = map.size();
if (size == 0) {
return VirtualValues.EMPTY_MAP;
}
MapValueBuilder builder = new MapValueBuilder(size);
for (Map.Entry<String, ?> entry : map.entrySet()) {
builder.add(entry.getKey(), Values.of(entry.getValue()));
}
return builder.build();
}
Aggregations