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

Incremental Blob Support #96

Open
mgd134 opened this issue Apr 3, 2015 · 0 comments
Open

Incremental Blob Support #96

mgd134 opened this issue Apr 3, 2015 · 0 comments

Comments

@mgd134
Copy link

mgd134 commented Apr 3, 2015

First, thanks for all the great work on this project. This isn't really an issue; I'm just hoping for a little help in something I'm trying to add. I figured this would be the easiest way to ask for the help.

I'm trying to add incremental blob support to sql.js. The problem I'm having is with the following sqlite3 function:

int sqlite3_blob_open( sqlite3_, const char *zDb, const char *zTable, const char *zColumn, v iRow, int flags, sqlite3_blob *_ppBlob ); https://www.sqlite.org/c3ref/blob_open.html

The problem I'm having is that when I pass in the rowid, I believe it is not being interpreted as 64-bit. Here is the error I get when I try to call it with a rowid of 1:

Uncaught Error: no such rowid: 4294967297

and with a rowid of 2:

Uncaught Error: no such rowid: 4294967298

I believe 4294967297 as 64 bit casted to 32 bit is 1, and the same with 4294967298 and 2, obviously. So I believe what's happening is that the emscripten compiler is making the sqlite3_int64 into a javascript Number and that is causing the problem. Perhaps this question is better posted to the emscripten project and if so let me know and I'll post it there. Anyway, does anyone know how I can get the generated JS code to accept a sqlite3_int64?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant