async operations
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript, sqlite
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- JavaScript
- Sterne
- 13.7k
- Forks
- 1.1k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sql-js/sql.js
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Ähnliche Issues
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
babalae/bettergi-scripts-list#3674 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
vadimdemedes/ink#1029 ·
-
code-quality refactoring
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
githubnext/gh-aw-cao#13143 ·