Comment on I accidentally removed the WHERE clause from my SQL query in a personal tool. Every row is now the same. I lost everything, have no backup, and I'm stupid.

<- View Parent
max@feddit.nl ⁨1⁩ ⁨year⁩ ago

Have a look at an ORM, if you are indeed executing plain SQL like I’m assuming from your comment. Sequelize might be nice to start with. What it does is create a layer between your application and your database. Using which, you can define the way a database object looks (like a class) and execute functions on that. For instance, if you’re creating a library, you could do book.update(), library.addBook(), etc. Since it adds a layer in between, it also helps you prevent common vulnerabilities such as SQL injection. This is because you aren’t writing the SQL queries in the first place. If you want to know more, let me know.

source
Sort:hotnewtop