Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Map in prepareQuery #68

Open
gkorland opened this issue Sep 16, 2024 · 0 comments · May be fixed by #69
Open

Add support for Map in prepareQuery #68

gkorland opened this issue Sep 16, 2024 · 0 comments · May be fixed by #69
Labels
enhancement New feature or request

Comments

@gkorland
Copy link
Contributor

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

@gkorland gkorland added the enhancement New feature or request label Sep 16, 2024
@gkorland gkorland linked a pull request Sep 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant