Currently I am using the pg module. I know how to query the database
client.query("INSERT INTO users(username, password) values($1, $2)", [username, password]
But I was wondering if there's a separate module that I don't know about or a "good practice" way of doing queries with PostgreSQL on Node. Especially if there is a primary key such as a username. I tried building models such as User.js but in the models I am still hard coding the query.
Thanks