Wolfgang-Schuetzelhofer / jcypher

Java access to Neo4J graph databases at multiple levels of abstraction
Apache License 2.0
86 stars 15 forks source link

Question: How to use support for new temporal data types #46

Closed andip closed 5 years ago

andip commented 5 years ago

Hi, as I understood from your release notes you've already implemented support for new temporal data types in Neo4j. How can I use this support when using your Query DSL (from package iot.jcypher.query)? Didn't found any suitable methods so far. For example, we're creating our queries dynamically like the following, since we don't have domain objects, but objects of type HashMap<String, Object> to store the properties that should be persisted inside a node:

        iot.jcypher.query.api.pattern.Node mergeNodePattern = MERGE.node(jcNode);
        for (String label : node.getLabels()) {
            mergeNodePattern.label(label);
        }

        for (Entry<String, Object> entry : node.getProperties().entrySet()) {
            mergeNodePattern.property(entry.getKey()).value(entry.getValue());
        }

The values inside the properties HashMap were stored with its real data types, but as I see all my properties are being stored as values of type String inside Neo4j. Anyway wouldn't it be a cool feature to provide a "values" method that automatically determines the suitable Neo4j data type?

Kind regards, Andreas