Demonstration on how to use sql.js (a javascript library to run SQLite on the web) with Shiny.
This simple demonstration works as follows:
- You upload a .sqlite file
- You execute a query
By default a query is loaded so you can inspect the tables in the database. There's a test .sql file (test_database.sqlite
) that can be used.
Under the hood:
- Copy .sqlite file to the www folder so the browser can access it
- Use sql.js to construct a database using that file
- Use that instance to exeucte queries on and return the results back to shiny
Note that you might need the latest version of httpuv
.