Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
tvandinther wants to merge28 commits intomaster
base:master
Choose a base branch
Loading
from25-expose-prepared-statements

Conversation

@tvandinther
Copy link
Owner

@tvandinthertvandinther commentedAug 31, 2024
edited
Loading

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.

@tvandinthertvandinther self-assigned thisAug 31, 2024
@tvandinthertvandintherforce-pushed the25-expose-prepared-statements branch from2fa47f9 to5401452CompareAugust 31, 2024 17:42
@tvandinther
Copy link
OwnerAuthor

Wondering if I revert this to commit5401452

The current implementation isn't ideal.

However, need to solve the issue in5401452 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?

@tvandinthertvandintherforce-pushed the25-expose-prepared-statements branch fromfb175d7 to85e5e7bCompareAugust 31, 2024 19:52
@tvandinther
Copy link
OwnerAuthor

Waiting for fix to C bindings to be merged upstreamtursodatabase/libsql#1713

@tvandinther
Copy link
OwnerAuthor

Upstream fix has been merged. This branch requires an update to the revision of libsql being built to include it.

@tvandinther
Copy link
OwnerAuthor

tvandinther commentedAug 30, 2025
edited
Loading

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 thatlibsql_stmt_columns is the last function to be correctly implemented for this feature to be ready.

@tvandinthertvandintherforce-pushed the25-expose-prepared-statements branch fromb4fdef5 to2b3c305CompareAugust 31, 2025 12:12
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@tvandinthertvandinther

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Expose the prepared statements interface

2 participants

@tvandinther

[8]ページ先頭

©2009-2025 Movatter.jp