Suggestion: Add node-postgres-named to easily support named parameters
Created by: n321203
I would suggest adding support for node-postgres-named It patches the pg-client to support named parameters (what it does is looking at the named parameters and write a regular array of parameters [$1, $2, $3 etc]...).
That way, we can write more readable queries:
(insertUser.sql):
INSERT INTO users VALUES ($firstname, $lastname)
(now we can write):
db.insertUser( {firstname: 'Peter', lastname: 'Pan'}, fn(...) )
Much more readable than writing queries with $1, $2 etc!