Sql.js - full SQLite in the browser
ฝัง
- เผยแพร่เมื่อ 7 พ.ย. 2024
- Learn how to use SQLite in the browser, using Sql.js. We'll learn how to install the library, then learn how to initialize a new database and run arbitrary SQL queries. Finally, we'll let the user to input their own queries to the database using a textarea.
Official library: sql.js.org/#/
Want to work with me? www.jeffreybil...
Twitter:
/ jeffreybiles
/ theeffectivedev
Pretty good small tutorial. I am kind of still new to Software, been learning on my own. Looking to create a small project using SQLite either with Python or JavaScript for a small project which would be web based without using a framework. Just pure JavaScript. Watching your video, I am guessing it would be easier to use Python with SQLite3. I could be wrong, but it seems using JavaScript with SQLite requires more work. I don't know I will figure it out along the way. But thank you for the excellent video I have now an idea of what to expect for my project.
if I have an .sqlite file locally, can I access it using sql.js? And what is the path you have in the locateFile fucntion?
I have the same question...
Had any luck? I spent hours on this and every time I try and open or create a database I get an unhandled error in sql.js...
@@m12652 No, sorry. I just switched to mongoDB. You can create a db for free there.
Failed to resolve module specifier "sql.js". -- What's my problem? I think I may have missed something when installing from npm.
THIS WAS ALL I NEEDED FROM PAST TWO DAYS🤧🤧🤧🤧, i need to make cart with sqlit and vue
How to add filters to make the query instead of typing the query?
Making a browser based javascript MTG multiplayer game and using sql databases for the cards/users/game states
I'm using this to import and export passwords in my password manager app
bad idea, a simple sql injection will get all your passwords
@@jh_matrix what sql injection ?
@@soniablanche5672 If your query is visible, then anybody can do a drop table on your passwords table
this is nice - BUT without save that database is pretty unusable
Not really, there are use cases where data becomes obsolete in minutes on applications designed to run for weeks or months. For example a telecom app where a temporary in-memory database of non-critical information would be useful; this isn't the first of these types of databases however its simplicity is appealing. I'll probably have a go at using it in the next few weeks but I'm a JavaScript tyro who just wants a scratch pad fast in-memory SQL database to develop my first non-trivial app.
can I use sqljs as a database for a regular html website?
yes
WHAT should I do in order to be able to call SQLite (already installed) from Javascript in Firefox ? Nobody cares.
It would be easier to read had you used backtick notation for your multiline SQL statements.
saving JWT