async operations
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 13.7k
- Forks
- 1.1k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, sqlite
- Domaine
- database, web-dev
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100