Skip to content

feat: perform DDL not in a transaction where possible #11206

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NickCrews
Copy link
Contributor

@NickCrews NickCrews commented May 13, 2025

This allows the user to be in control of the transaction.

Now I can do

con.raw_sql("begin transaction")
con.insert("a", a)
con.insert("b", b)
con.raw_sql("commit")

and the two operations will be atomic. This isn't complete. Ideally we were consistent with this everywhere, but this is a good start for the operations I am doing.

This allows the user to be in control of the transaction.
@github-actions github-actions bot added duckdb The DuckDB backend sql Backends that generate SQL labels May 13, 2025
@NickCrews
Copy link
Contributor Author

Before I go through the effort of fixing the tests, I'd love a quick confirmation that this is going in the right direction.

@cpcloud
Copy link
Member

cpcloud commented May 14, 2025

Can't you use the Backend.begin() method for this? Or does that not work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duckdb The DuckDB backend sql Backends that generate SQL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants