def _run(self, statement, parameters): from neo4j.v1.result import BoltStatementResult from neo4j.v1.types import fix_parameters if self.closed(): raise SessionError("Session closed") run_response = Response(self._connection) pull_all_response = Response(self._connection) self._last_result = result = BoltStatementResult(self, run_response, pull_all_response) result.statement = ustr(statement) result.parameters = fix_parameters(parameters, self._connection.protocol_version, supports_bytes=self._connection.server.supports_bytes()) self._connection.append(RUN, (result.statement, result.parameters), response=run_response) self._connection.append(PULL_ALL, response=pull_all_response) return result
def dehydrated_value(value): return fix_parameters({"_": value}, 1, supports_bytes=True)["_"]