Postgres.js –the fastest full-featured PostgreSQL client for Node.js and Deno.
// users.js import sql from './db.js' async function getUsersOver(age) { const users = await sql` select name, age from users where age > ${ age } ` // users = Result [{ name: "Walter", age: 80 }, { name: 'Murray', age: 68 }, ...] return users }
No comments:
Post a Comment