-
Notifications
You must be signed in to change notification settings - Fork 203
Introduce API Redesign #763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
7043662
3db7a70
c4d2c89
e0c879c
d0293e7
5d52bab
26b19a9
e3b1223
5759926
7fe9204
7896b06
9de9924
2c7004c
62fb7ae
056ac54
915875d
7af3bd9
b6fcfb2
7fb2afd
6d5e550
ed575f9
8bb4498
b64b3c8
cc875d2
0e8cbfc
ecf966f
0ad6459
a8d541f
d147e62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -246,7 +246,10 @@ async def run(self, query, parameters=None, **kwargs): | |
|
|
||
| return self._auto_result | ||
|
|
||
| async def query(self, query, parameters=None, **kwargs): | ||
| async def query(self, query, parameters=None, | ||
| cluster_member_access=CLUSTER_AUTO_ACCESS, | ||
| skip_records=False, | ||
| **kwargs): | ||
| """ | ||
| Run a Cypher query within an managed transaction. | ||
|
|
||
|
|
@@ -269,7 +272,6 @@ async def query(self, query, parameters=None, **kwargs): | |
| :returns: a new :class:`neo4j.QueryResult` object | ||
| :rtype: QueryResult | ||
| """ | ||
| skip_records = kwargs.pop("skip_records", False) | ||
|
|
||
| async def job(tx, **job_kwargs): | ||
| if skip_records: | ||
|
|
@@ -278,9 +280,15 @@ async def job(tx, **job_kwargs): | |
| return QueryResult([], summary) | ||
| return await tx.query(query, parameters, **job_kwargs) | ||
|
|
||
| return await self.execute(job, **kwargs) | ||
| return await self.execute( | ||
| job, | ||
| cluster_member_access=cluster_member_access, | ||
| **kwargs | ||
| ) | ||
|
|
||
| async def execute(self, transaction_function, *args, **kwargs): | ||
| async def execute(self, transaction_function, *args, | ||
| cluster_member_access=CLUSTER_AUTO_ACCESS, | ||
| **kwargs): | ||
bigmontz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| """Execute a unit of work in a managed transaction. | ||
|
|
||
| This transaction will automatically be committed unless an exception | ||
|
|
@@ -339,10 +347,6 @@ async def get_two_tx(tx): | |
|
|
||
| :return: a result as returned by the given unit of work | ||
bigmontz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| """ | ||
| cluster_member_access = kwargs.pop( | ||
| "cluster_member_access", CLUSTER_AUTO_ACCESS | ||
| ) | ||
|
|
||
| if cluster_member_access == CLUSTER_AUTO_ACCESS: | ||
| if await self._supports_auto_routing(): | ||
| access_mode = READ_ACCESS | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.