Skip to content

Add support for Map in prepareQuery #68

@gkorland

Description

@gkorland

Create multiple nodes with a parameter for their properties

By providing Cypher® an array of maps, it will create a node for each map.

UNWIND $props AS map
CREATE (n)
SET n = map

Discovered that the client does not support it

private static String valueToString(Object value) {
        if(value == null) return "null";

        if(value instanceof String){
            return quoteString((String) value);
        }
        if(value instanceof Character){
            return quoteString(((Character)value).toString());
        }

        if(value instanceof Object[]){
            return arrayToString((Object[]) value);

        }
        if(value instanceof List){
            @SuppressWarnings("unchecked")
            List<Object> list = (List<Object>) value;
            return arrayToString(list.toArray());
        }
        return value.toString();
    }

it doesn't have a toString for maps

com.falkordb.impl.Utils line 68

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions