Examples of CypherResult


Examples of org.neo4j.rest.graphdb.query.CypherResult

    }

    protected void updateRelationships() {
        if (expected==null) expected = updateTo;
        Iterable<Relationship> rels = restAPI.updateRelationships(node(), updateTo, type, direction, targetLabel);
        CypherResult result = restAPI.query("MATCH (n)--(m) WHERE id(n) = {id} WITH id(m) as id ORDER BY id RETURN collect(id) as ids", map("id", node().getId()));
        assertEquals(1, count(result.getData()));
        assertEquals(toSortedIdList(expected), result.getData().iterator().next().get(0));
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.query.CypherResult

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String query;
        System.out.print("Query: ");
        while ((query=reader.readLine())!=null && !query.isEmpty()) {
            long time=System.currentTimeMillis();
            CypherResult result = restAPIFacade.query(query, null);
            time=System.currentTimeMillis()-time;
            System.out.println(result.getColumns());
            List<List<Object>> rows = (List<List<Object>>) result.getData();
            for (List<Object> row : rows) {
                System.out.println(row);
            }
            System.out.println(rows.size()+" row(s), roundtrip time "+time+" ms.");
            System.out.print("Query: ");
View Full Code Here

Examples of org.neo4j.rest.graphdb.query.CypherResult

        if (!(col instanceof Collection)) throw new RuntimeException(String.format("Unexpected traversal result, %s instead of collection", col != null ? col.getClass() : null));
        return new RestTraverser((Collection) col,restNode.getRestApi());
    }

    public QueryResult<Map<String, Object>> query(String statement, Map<String, Object> params, ResultConverter resultConverter) {
        final CypherResult result = query(statement, params);
        if (RestResultException.isExceptionResult(result.asMap())) throw new RestResultException(result.asMap());
        return RestQueryResult.toQueryResult(result, this, resultConverter);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.