async operations
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, sqlite
Research direction
No file or test is named; start at the SQL.Database constructor and the File.slice(start, end).arrayBuffer() flow described in the issue. Determine whether a File can support the requested read-only database and asynchronous stmt.getAsObject() usage without loading the whole file into memory.
Written by the indexing model from the issue text.
Description
I know you can create a sql instance of an uint8array and make operations on that.
but i wonder: is it possible to just load a simple File instead of a Uint8Array?
i would like to load a read-only database and being able to do:
// load file from <input type="file">
const file = input.files[0]
// Create a database from a file without reading everything into memory
const db = new SQL.Database(file)
// Prepare an sql statement
const stmt = db.prepare("SELECT * FROM sqlite_master")
// Bind values to the parameters and fetch the results of the query
const result = await stmt.getAsObject()
// note: using await
The idea would just be for sql.js to slice the part of the file that is needed without loading the hole thing into memory
and kind of doing: await file.slice(start, end).arrayBuffer() operations instead
- Dominant language
- JavaScript
- Stars
- 13.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sql-js/sql.js
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100