Skip to content
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

Batch.Queue: document always uses the conn's DefaultQueryExecMode #1824

Merged
merged 1 commit into from
Dec 9, 2023
Merged

Batch.Queue: document always uses the conn's DefaultQueryExecMode #1824

merged 1 commit into from
Dec 9, 2023

Conversation

evanj
Copy link
Contributor

@evanj evanj commented Dec 4, 2023

The only way to change the query mode used by Batch.Queue and SendBatch is to use a connection with a different
DefaultQueryExecMode. Add this to the function documentation.

Conn.SendBatch: Move where mode is defined to make this clearer in the code. I spent time looking for the option that does not exist.

The only way to change the query mode used by Batch.Queue and
SendBatch is to use a connection with a different
DefaultQueryExecMode. Add this to the function documentation.

Conn.SendBatch: Move where mode is defined to make this clearer in
the code. I spent time looking for the option that does not exist.
@jackc jackc merged commit 384fe77 into jackc:master Dec 9, 2023
14 checks passed
@jackc
Copy link
Owner

jackc commented Dec 9, 2023

Good to have it documented more clearly.

If we did want to be able to control the execution mode per batch then that probably could be implemented via an additional field on the pgx.Batch struct fairly easily.

@evanj
Copy link
Contributor Author

evanj commented Dec 9, 2023

Sounds great thank you. Right now I'm just experimenting with this, and haven't needed to change the execution mode. If I do, I'll submit a PR. Thanks as always for the fast response.

@evanj evanj deleted the evan.jones/clarify-batch-query-mode branch December 9, 2023 18:36
Sign up for free to 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