The World's Most Advanced Open Source Relational Database
Write custom Node.js code and use any of the 400k+ npm packages available. Refer to the Pipedream Node docs to learn more.
Assuming you want a few paragraphs on what you can do with the PostgreSQL API:
The following examples demonstrate some of the things that can be done with the
PostgreSQL API:
module.exports = defineComponent({
props: {
postgresql: {
type: "app",
app: "postgresql",
}
},
async run({steps, $}) {
const { Client } = require('pg')
const { host, user, password, port, database } = this.postgresql.$auth
const client = new Client({
host,
database,
user,
password,
port,
})
await client.connect()
this.results = (await client.query("SELECT NOW()")).rows
await client.end()
},
})
// To use previous step data, pass the `steps` object to the run() function
export default defineComponent({
async run({ steps, $ }) {
// Return data to use it in future steps
return steps.trigger.event
},
})