-
Notifications
You must be signed in to change notification settings - Fork 11
Expose prepared statements #27
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
base: master
Are you sure you want to change the base?
Conversation
2fa47f9 to
5401452
Compare
|
Wondering if I revert this to commit 5401452 The current implementation isn't ideal. However, need to solve the issue in 5401452 where getting the first row of a queried statement after it was reset returns a row with a null pointer which creates a column type array with an enum value of 0 which is invalid. Seems like there is some kind of cursor reset somewhere? |
fb175d7 to
85e5e7b
Compare
|
Waiting for fix to C bindings to be merged upstream tursodatabase/libsql#1713 |
|
Upstream fix has been merged. This branch requires an update to the revision of libsql being built to include it. |
|
Update: This feature requires some extra FFI bindings as defined in this branch/fork: https://github.com/tvandinther/libsql/tree/add-missing-statement-functions It appears that |
b4fdef5 to
2b3c305
Compare
Closes #25
This MR implements an interface to expose prepared statements. The internals are also changed to support this new feature.
Public interface changes are present in this MR.
Parameter binding implementation
Bound parameters are held internally in C# and are bound late when the statement is sent for execution. Resetting the statement currently creates a new prepared statement. A change to the bindings code needs to be made to make this both performant and to prevent new bindings from being made.