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

refactor(sqlite): make background thread responsible for all FFI calls #1551

Merged
merged 1 commit into from
Dec 29, 2021

Conversation

abonander
Copy link
Collaborator

@abonander abonander commented Nov 19, 2021

This is a significant refactor but is almost entirely internal and should be completely backwards-compatible.

There's a couple things I'm still debating, like merging SqliteValue and SqliteArgumentValue. It doesn't make much sense to use sqlite3_value_dup to send sqlite3_values back to the main thread when we could just eagerly convert them to their equivalent Rust types, especially since the former is going to always be heap-allocated.

On further consideration, I think I'll keep SqliteValue as it is because it technically allows access to SQLite's weak typing system by getting a value as a different type than it actually is.

Closes #634
Closes #1175
Closes #1467

@abonander abonander changed the title refactor(sqlite): make background thread responsible for all FFI calls WIP refactor(sqlite): make background thread responsible for all FFI calls Nov 19, 2021
@abonander abonander force-pushed the ab/sqlite-refactor branch 5 times, most recently from 68e8b0f to 01c1c3c Compare November 20, 2021 00:11
@abonander abonander changed the title WIP refactor(sqlite): make background thread responsible for all FFI calls refactor(sqlite): make background thread responsible for all FFI calls Nov 20, 2021
@abonander abonander force-pushed the ab/sqlite-refactor branch 2 times, most recently from cc7d1a4 to 4d64b56 Compare November 23, 2021 00:15
@abonander abonander force-pushed the ab/sqlite-refactor branch 2 times, most recently from 6943ac0 to 91cc6ac Compare December 29, 2021 22:35
@abonander abonander merged commit 63ca2cc into master Dec 29, 2021
@abonander abonander deleted the ab/sqlite-refactor branch December 29, 2021 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant