Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
augchan42 committed Nov 30, 2024
1 parent 9e638d6 commit dae8067
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/adapter-postgres/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { v4 } from "uuid";

// Import the entire module as default
import pg from "pg";
const { Pool } = pg;
type PoolType = pg.Pool;
import pg, { Pool } from "pg";
type PgPool = typeof Pool;

import {
QueryConfig,
Expand Down Expand Up @@ -33,7 +32,7 @@ const __filename = fileURLToPath(import.meta.url); // get the resolved path to t
const __dirname = path.dirname(__filename); // get the name of the directory

export class PostgresDatabaseAdapter
extends DatabaseAdapter<PoolType>
extends DatabaseAdapter<PgPool>
implements IDatabaseCacheAdapter
{
private pool: PoolType;
Expand Down Expand Up @@ -756,6 +755,7 @@ export class PostgresDatabaseAdapter
return this.withRetry(async () => {
try {
const relationshipId = v4();
await this.pool.query(
await this.pool.query(
`INSERT INTO relationships (id, "userA", "userB", "userId")
VALUES ($1, $2, $3, $4)
Expand Down

0 comments on commit dae8067

Please sign in to comment.