export 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
})
export 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
})