-
Notifications
You must be signed in to change notification settings - Fork 10
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
API problem "var row in db.Query("SELECT rowid, * FROM foo").ToArray()" #40
Comments
The issue you are encountering is that the the enumerated IResultSetValue instances are references to underlying SQLite dynamic types, and only valid for a specific iteration of the underly sqlite statement. The following should work.
I was pretty sure I documented this but can't seem to find the explanation in the docs, though all the examples illustrate how to use IResultSetValue correctly. |
I know, and I also found that solution. "the statement is already disposed. Calling any member of IResultSetValue after the enumeration has completed is not supported. Go to https://github.com/bordoley/SQLitePCL.pretty/blob/master/README.md to learn more" |
Yeah, I'd accept a PR for that. I'm pretty sure the exception is thrown by accessing the StatementImpl.sqlite3_stmt property here: That property access is called from ResultSetValueImpl.ToInt() here: |
kk. will do |
Hi!
I migrated SyncClient.SQLite from SQLitePCL to your SQLitePCL.pretty.
Honestly, I do like your api better, but there is a pretty serious gotcha:
The following code will give you an ObjectDisposedException:
I tried to find out how that works underneath, but I could not find any clue.
What I do know, is that you need to dispose the internals IStatement somehow, but cant there be another way of doing it?
The text was updated successfully, but these errors were encountered: