If the database you want to query is hosted via a web URL, sql.js can load the database from the URL. If you know of such an example, please let me know via the comments. It would be handy if a simple template for creating sql.js apps with custom queries and database and query persistence using IndexedDB were available. Packages such as dexie.js provide a convenient wrapper around it and tools such as manics/jupyter-offlinenotebook can use it to persist items in the browser from otherwise transient web application sessions, such as MyBinder powered Jupyter notebook sessions. IndexedDB is a NoSQL storage solution that is supported inside contemporary browsers. In the case of sql.js, the minimal demo UI does not persist the database, nor provide any means for saving and reusing queries: it is just a minimal, temporary UI. But there is another huge issue that is perhaps currently a blocker for using in-browser apps in an educational setting: if you edit content in the app – for example, a SQL query you spent ages crafting – you lose it when you close the web page: there is nowhere you can save it to and then reload it, nowhere you can persist it, unless you export it / downlad it to the desktop, and then import it / upload it from the desktop next time you run the application. Fortunately, applications such as v make it possible to run a webserver in your web browser to serve content held locally by uploading it to the browser and serving it from there:įor running simple applications, installing something like v as an app so you can run it offline is really handy when it comes to not requiring a user to run their own webserver.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |