Postgres UNNEST cheat sheet for bulk operations
Postgres is normally very fast, but it can become slow (or even fail completely), if you have too many parameters in your queries. When it comes to operating on data in bulk,
UNNEST is the only way to achieve fast, reliable queries. This post has examples for using
UNNEST to do all types of bulk transactions.
Choosing a node.js database
One of the first things you'll need to do when starting most node projects is to chose a database and database library. You'll normally want to choose your database before you choose the library, but in the case of @databases, we support a few different databases, so you do have some leeway.
Node.js in memory database
In addition to working with a file, you can also use SQLite as an in-memory database. If you do this it will not be persisted, but it can be very useful for tests.
How to create an SQLite database in node.js
SQLite is a great database for embedded use cases. e.g. if you are using node.js in IOT, or an Electron app.
SQL Injection in Node.js
SQL Injection remains one of the most prevalent and easily exploitable security vulnerabilities in modern web applications. The main reason for this is SQL libraries making it so easy to get this wrong.