Skip to content

Commit c212086

Browse files
authored
Update postgres-dialect.ts
Update pg import for CommonJS pg package does not support ESM so the imports need to handle CommonJS See: <brianc/node-postgres#3060>
1 parent 680eb46 commit c212086

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/dialect/postgres/postgres-dialect.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import { PostgresDialectConfig } from './postgres-dialect-config.js'
1616
* The constructor takes an instance of {@link PostgresDialectConfig}.
1717
*
1818
* ```ts
19-
* import { Pool } from 'pg'
19+
* import pg from 'pg'
2020
*
2121
* new PostgresDialect({
22-
* pool: new Pool({
22+
* pool: new pg.Pool({
2323
* database: 'some_db',
2424
* host: 'localhost',
2525
* })
@@ -30,10 +30,10 @@ import { PostgresDialectConfig } from './postgres-dialect-config.js'
3030
* can be a function:
3131
*
3232
* ```ts
33-
* import { Pool } from 'pg'
33+
* import pg from 'pg'
3434
*
3535
* new PostgresDialect({
36-
* pool: async () => new Pool({
36+
* pool: async () => new pg.Pool({
3737
* database: 'some_db',
3838
* host: 'localhost',
3939
* })

0 commit comments

Comments
 (0)