Package org.neo4j.cypher.javacompat

Examples of org.neo4j.cypher.javacompat.ExecutionResult


  private T deserialize( @Nonnull AbstractNeo4jSerializer<T> serializer, @Nonnull String serialized ) throws IOException {
    GraphDatabaseService db = neo4jRule.createDb();

    //Fill the db initially
    try ( Transaction tx = db.beginTx() ) {
      ExecutionResult result = new ExecutionEngine( db ).execute( serialized );
      tx.success();
    }

    try ( Transaction tx = db.beginTx() ) {
      return serializer.deserialize( db.getNodeById( 0 ) );
View Full Code Here


                    tx.commit();
                    continue;
                }
                params.clear();
                String queryWithParams = extractor.extract(query, params);
                ExecutionResult result = executionEngine.execute(queryWithParams, params);
                ProgressReporter.update(result.getQueryStatistics(), reporter);
                tx.increment();
            }
        }
        return reporter.getTotal();
    }
View Full Code Here

        if (reader==null) return null;
        return config.isQuotes() ? new CSVReader(reader,config.getDelimChar(), Config.QUOTECHAR) : new CSVReader(reader,config.getDelimChar());
    }

    private int execute(String query, CSVWriter writer) {
        ExecutionResult result = getEngine().execute(query);
        return writeResult(result, writer,true);
    }
View Full Code Here

        int outCount = 0;
        try (BatchTransaction tx = new BatchTransaction(getServer().getDb(),config.getBatchSize(),reporter)) {
            while ((input = reader.readNext()) != null) {
                Map<String, Object> queryParams = update(params, types, input);
                String newQuery = applyReplacements(query, replacements, queryParams);
                ExecutionResult result = getEngine().execute(newQuery, queryParams);
                outCount += writeResult(result, writer, first);
                first = false;
                ProgressReporter.update(result.getQueryStatistics(), reporter);
                tx.increment();
            }
        }
        return outCount;
    }
View Full Code Here

        return (GraphDatabaseShellServer) super.getServer();
    }

    private SubGraph cypherResultSubGraph(String query, boolean relsBetween) {
        try (Transaction tx = getServer().getDb().beginTx()) {
            ExecutionResult result = getEngine().execute(query);
            SubGraph subGraph = CypherResultSubGraph.from(result, getServer().getDb(), relsBetween);
            tx.success();
            return subGraph;
        }
    }
View Full Code Here

TOP

Related Classes of org.neo4j.cypher.javacompat.ExecutionResult

Copyright © 2018 www.massapicom. 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.