-
Notifications
You must be signed in to change notification settings - Fork 265
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
sqlite: Add split module #1772
sqlite: Add split module #1772
Conversation
lann
commented
Sep 15, 2023
•
edited
Loading
edited
dab566b
to
1ac9aa4
Compare
I thought it was only used by the libsql implementation, so would vote for having it in the libsql crate as a private implementation detail, but that's a nit, and easy to move after merge. This isn't currently hooked up to the libsql code that requires splitting; is that because this was primarily about socialising and agreeing the approach rather than plumbing it in? (It's fine if it is, I or others can do the plumbing - just checking.) |
Yeah it was more of a proof of concept that got out of hand. |
I did a quick test with this to make sure it approved Karthik's vexing SQL The less good news is that this seemed to struggle with parsing files where one statement depended on a previous one. It happened that my test file for Karthik's SQL included some of my old database CREATE/INSERT setup - and that failed. Minimal repro:
failed with "no such table: fiteme23". Could the embedded connection be doing more than parsing and be actually validating each statement in the context of the connection itself? Although if that were the case I don't get why it would allow the virtual table SQL which rusqlite presumably wouldn't be able to process without extensions. (for the unit tests, the happy entry is |
Ugh I meant to test that but lost track of it in my unit testing fervour. I have another way to tackle this that I can try tomorrow. |
OK, this version doesn't validate statements quite so vigorously. |
Used to split statements for execute_batch. Signed-off-by: Lann Martin <lann.martin@fermyon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of test cases I'd like to throw in (they pass, just to have them locked in), but otherwise LGTM. Thanks!
Signed-off-by: Lann Martin <lann.martin@fermyon.com>