Using SQlite in Node.js
So, how do we use SQLite in a Node.js application? Let's find out!
Note!
When communicating with an SQLite 3 database, foreign key constraints are disabled by default! To enable them, you must send the query PRAGMA foreign_keys = ON
to the database after you have established a connection with it.
Learn more about this in the documentation for enabling foreign key constraints in SQLite.
Lecture material
Recommended reading
- sqlite3 Documentation:
- API Documentation
(read if you need to learn some details)
- API Documentation