📜  postgresql nodejs - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:26.296000             🧑  作者: Mango

代码示例1
const { Client } = require('pg')const client = new Client();(async () => {  await client.connect()  const res = await client.query('SELECT $1::text as message', ['Hello world!'])  console.log(res.rows[0].message) // Hello world!  await client.end()})()