Accessing the Underlying `postgres.js` Instance in Effect Typescript
I know this is supper hacky, is this the best way to get access to the underlying
postgres.js instance?postgres.jsexport const getPostgresConnection = Effect.gen(function* () {
const pgClient = yield* PgClient.PgClient
// Access the underlying postgres connection through the acquirer
const connection = yield* pgClient.reserve
// The connection has a 'pg' property that contains the postgres client
const postgresClient: postgres.Sql = (connection as any).pg
return postgresClient
})