The World's Most Advanced Open Source Relational Database
Add or update a single record in your Pipedream Data Store.
Add or update multiple records to your Pipedream Data Store.
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()
},
})
With the Data Stores API, you can build applications that:
export default defineComponent({
props: {
myDataStore: {
type: "data_store",
},
},
async run({ steps, $ }) {
await this.myDataStore.set("key_here","Any serializable JSON as the value")
return await this.myDataStore.get("key_here")
},
})