Skip to content

add atomic iteration option to codegen - #386

Closed
TomFaulkner wants to merge 1 commit into
geldata:masterfrom
TomFaulkner:master
Closed

add atomic iteration option to codegen#386
TomFaulkner wants to merge 1 commit into
geldata:masterfrom
TomFaulkner:master

Conversation

@TomFaulkner

@TomFaulknerTomFaulkner commented Oct 22, 2022

Copy link
Copy Markdown

Adds atomic transactions option to change client to transaction iteration.

This and similar for blocking:

ifself._atomic:
print(f"{INDENT}transaction: edgedb.asyncio_client.AsyncIOIteration,", file=buf)
else:
print(f"{INDENT}client: edgedb.AsyncIOClient,", file=buf)

@fantix

Copy link
Copy Markdown
Member

Thanks for the PR! I'm thinking we should probably do something like this instead:

asyncdefmy_query(
executor: edgedb.AsyncIOExecutor,
...
) ->MyQueryResult:
returnawaitexecutor.query_single(...)

So that both AsyncIOClient and AsyncIOIteration (transaction) are supported.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@TomFaulkner@fantix