Innoway tích hợp bộ cộng cụ node-postgres giúp người dùng kết nối và thao tác trực tiếp với database Postgres
const client = new pg.Client({
host: '{{host}}',
port: {{port}},
database: '{{database}}',
user: '{{user}}',
password: {{password}},
})
await client.connect()
let insertDataText = 'INSERT INTO test(name, age) VALUES ($1, $2)'
let insertDataValues = ['Innoway', 2]
const res = await client.query(insertDataText, insertDataValues)
await client.end()
return {}