Skip to content

Add support for transaction to the vtab module#1696

Closed
jwhear wants to merge 1 commit into
rusqlite:masterfrom
jwhear:add_vtab_transactions
Closed

Add support for transaction to the vtab module#1696
jwhear wants to merge 1 commit into
rusqlite:masterfrom
jwhear:add_vtab_transactions

Conversation

@jwhear

@jwhear jwhear commented May 20, 2025

Copy link
Copy Markdown
Contributor

The virtual table interface allows xBegin, xSync, xCommit, and xRollback to be defined. This commit provides a trait, TransactionVTab and rustified versions of those methods.

Note that the module macro is getting a bit cumbersome and should possibly be redesigned. Additionally the readonly_module, update_module, and update_module_with_tx methods simply aren't going to scale if other orthogonal virtual table features are added. It's not obvious to me what a better design would be but I'm happy to take suggestions.

The virtual table interface allows xBegin, xSync, xCommit, and xRollback to be
defined. This commit provides a trait, `TransactionVTab` and rustified
versions of those methods.

Note that the `module` macro is getting a bit cumbersome and should possibly be
redesigned.
@gwenn

gwenn commented Nov 12, 2025

Copy link
Copy Markdown
Collaborator

Note that the module macro is getting a bit cumbersome and should possibly be redesigned. Additionally the readonly_module, update_module, and update_module_with_tx methods simply aren't going to scale if other orthogonal virtual table features are added. It's not obvious to me what a better design would be but I'm happy to take suggestions.

Just for reference:
https://docs.rs/sqlite3_ext/latest/sqlite3_ext/attr.sqlite3_ext_vtab.html

@gwenn

gwenn commented Nov 30, 2025

Copy link
Copy Markdown
Collaborator

Sorry for the delay, PR fixed (minor) and merged.
Thanks.

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