PreparedStatement is a parameterized query which can avoid planning the same query for repeated execution.
auto preparedStatement = conn->prepare("MATCH (a:person) WHERE a.isStudent = $1 RETURN COUNT(*)"); auto result = conn->execute(preparedStatement.get(), std::make_pair(std::string("1"), true));
A prepared statement is a parameterized query which can avoid planning the same query for repeated execution.
bool allowActiveTransaction ()
DDL and COPY_CSV statements are automatically wrapped in a transaction and committed. As such, they cannot be part of an active transaction.
- the prepared statement is allowed to be part of an active transaction.
std::string getErrorMessage ()
- the error message if the query is not prepared successfully.
bool isReadOnly ()
- the prepared statement is read-only or not.
bool isSuccess ()
- the query is prepared successfully or not.