Skip to content

Commit 7b8165f

Browse files
fix(@effect/sql-pg): readded stream to PgClientConfig (#5998)
Co-authored-by: Tim <hello@timsmart.co>
1 parent 3134f12 commit 7b8165f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/readd-stream-sql-pg.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect/sql-pg": patch
3+
---
4+
5+
Readded stream as an optional parameter to PgClientConfig.

packages/sql-pg/src/PgClient.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import * as RcRef from "effect/RcRef"
2222
import * as Redacted from "effect/Redacted"
2323
import * as Scope from "effect/Scope"
2424
import * as Stream from "effect/Stream"
25+
import type { Duplex } from "node:stream"
2526
import type { ConnectionOptions } from "node:tls"
2627
import * as Pg from "pg"
2728
import * as PgConnString from "pg-connection-string"
@@ -77,6 +78,8 @@ export interface PgClientConfig {
7778
readonly username?: string | undefined
7879
readonly password?: Redacted.Redacted | undefined
7980

81+
readonly stream?: (() => Duplex) | undefined
82+
8083
readonly idleTimeout?: Duration.DurationInput | undefined
8184
readonly connectTimeout?: Duration.DurationInput | undefined
8285

@@ -120,6 +123,7 @@ export const make = (
120123
password: options.password ? Redacted.value(options.password) : undefined,
121124
ssl: options.ssl,
122125
port: options.port,
126+
stream: options.stream!,
123127
connectionTimeoutMillis: options.connectTimeout
124128
? Duration.toMillis(options.connectTimeout)
125129
: undefined,

0 commit comments

Comments
 (0)