Search in sources :

Example 1 with BoltTransaction

use of org.neo4j.ogm.drivers.bolt.transaction.BoltTransaction in project neo4j-ogm by neo4j.

the class BoltRequest method executeRequest.

private Result executeRequest(Statement request) {
    try {
        Map<String, Object> parameterMap = this.parameterConversion.convertParameters(request.getParameters());
        String cypher = cypherModification.apply(request.getStatement());
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Request: {} with params {}", cypher, parameterMap);
        }
        BoltTransaction tx = (BoltTransaction) transaction;
        return tx.nativeBoltTransaction().run(cypher, parameterMap);
    } catch (ClientException | DatabaseException | TransientException ce) {
        throw new CypherException(ce.code(), ce.getMessage(), ce);
    }
}
Also used : BoltTransaction(org.neo4j.ogm.drivers.bolt.transaction.BoltTransaction) TransientException(org.neo4j.driver.exceptions.TransientException) ClientException(org.neo4j.driver.exceptions.ClientException) CypherException(org.neo4j.ogm.exception.CypherException) DatabaseException(org.neo4j.driver.exceptions.DatabaseException)

Aggregations

ClientException (org.neo4j.driver.exceptions.ClientException)1 DatabaseException (org.neo4j.driver.exceptions.DatabaseException)1 TransientException (org.neo4j.driver.exceptions.TransientException)1 BoltTransaction (org.neo4j.ogm.drivers.bolt.transaction.BoltTransaction)1 CypherException (org.neo4j.ogm.exception.CypherException)1