use of org.neo4j.exceptions.InvalidSemanticsException in project neo4j by neo4j.
the class Invocation method executeStatement.
private void executeStatement(Statement statement) throws Exception {
boolean periodicCommit = transactionHandle.isPeriodicCommit(statement.getStatement());
if (periodicCommit) {
if (hasPrevious || readStatement() != null) {
throw new QueryExecutionKernelException(new InvalidSemanticsException("Cannot execute another statement with PERIODIC COMMIT statement in the same transaction", null));
}
transactionHandle.closeTransactionForPeriodicCommit();
}
hasPrevious = true;
Result result;
try {
result = transactionHandle.executeStatement(statement, periodicCommit);
} finally {
if (periodicCommit) {
transactionHandle.reopenAfterPeriodicCommit();
}
}
writeResult(result, statement);
}
Aggregations