Comments (1)
I think this works out of the box, just calling SQL.open(data)
. To open a database from a file, so something like:
var input = document.querySelectorAll('#file-input')[0].files[0];
var reader = new FileReader();
reader.onload = function(e) {
// reader.result is your data blob.
};
reader.readAsBinaryString(input);
Perhaps reader.readAsDataURL()
might help you also.
from sql.js.
Related Issues (20)
- Pre-compiling SQL queries HOT 3
- "Official" build of SQLite for WebAssembly HOT 1
- Electron package related bug when load wasm file HOT 1
- There is no commit for transactions? (No way to DELETE rows / etc?)
- why e.stackAlloc null? HOT 2
- Is there a trigger, event, procedure feature in sql.js? HOT 2
- More powerful prepared statements are required HOT 1
- Getting "bad parameter or other API misuse" for a prepared statement with correct data
- How to properly get the generated ID of an inserted row? HOT 1
- Can't resolve 'fs' HOT 7
- [Feature Request] Support for sqlite3_interrupt HOT 1
- Build wasm HOT 2
- Convert sql-wasm.wasm to base64 and embed in HTML/JavaScript HOT 6
- How to use in Vite? HOT 1
- Read/Write db to disk in an HTML file HOT 1
- Read/Write files in HTML HOT 2
- Extend Database#create_function to support creating deterministic functions
- Adding the series extension HOT 6
- How can you create a table with blob values? HOT 5
- How to load .wasm from Uint8Array? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sql.js.