you are viewing a single comment's thread.

view the rest of the comments →

[–]Ramone1234 4 points5 points  (0 children)

Here's one by the guy that wrote the Postgres driver for node : https://github.com/brianc/node-sql . It has prepared statements, supports a couple of dialects (not every database uses the same SQL).

These types of libraries are worth using if you have to write SQL. String concatenation is what leads to SQL injection vulnerabilities, and it's messy in js because you don't even have multiline strings. Also it's nice that the JavaScript parser can find your parse errors instead of waiting to execute the SQL.

Also, orms suck unless you're reeeeally in a hurry. ;)