class PostgresEngineCloud SQL shared connection pool
Setup:
Install @langchain/google-cloud-sql-pg
import { Column, PostgresEngine, PostgresEngineArgs } from "@langchain/google-cloud-sql-pg";
const pgArgs: PostgresEngineArgs = {
user: "db-user",
password: "password"
}
const engine: PostgresEngine = await PostgresEngine.fromInstance(
"project-id",
"region",
"instance-name",
"database-name",
pgArgs
);