sql-js / sql-js/sql.js

Incremental Blob Support

オープン
#96 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
JavaScript
スター
13.7k
フォーク
1.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Start by reproducing the sqlite3_blob_open call described in the issue with rowids 1 and 2, then read the linked SQLite blob_open documentation and inspect the generated JavaScript boundary. Done means sqlite3_int64 rowids are passed without becoming 4294967297 or 4294967298, and incremental blob opening works for those values.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
database
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。