File tree 1 file changed +4
-6
lines changed
packages/adapter-postgres/src
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { v4 } from "uuid";
3
3
// Import the entire module as default
4
4
import pg from "pg" ;
5
5
const { Pool } = pg ;
6
- type Pool = pg . Pool ;
6
+ type PoolType = pg . Pool ;
7
7
8
8
import {
9
9
QueryConfig ,
@@ -29,16 +29,14 @@ import fs from "fs";
29
29
import { fileURLToPath } from "url" ;
30
30
import path from "path" ;
31
31
32
- const { DatabaseError } = pg ;
33
-
34
32
const __filename = fileURLToPath ( import . meta. url ) ; // get the resolved path to the file
35
33
const __dirname = path . dirname ( __filename ) ; // get the name of the directory
36
34
37
35
export class PostgresDatabaseAdapter
38
- extends DatabaseAdapter < Pool >
36
+ extends DatabaseAdapter < PoolType >
39
37
implements IDatabaseCacheAdapter
40
38
{
41
- private pool : Pool ;
39
+ private pool : PoolType ;
42
40
private readonly maxRetries : number = 3 ;
43
41
private readonly baseDelay : number = 1000 ; // 1 second
44
42
private readonly maxDelay : number = 10000 ; // 10 seconds
@@ -758,7 +756,7 @@ export class PostgresDatabaseAdapter
758
756
return this . withRetry ( async ( ) => {
759
757
try {
760
758
const relationshipId = v4 ( ) ;
761
- const result = await this . pool . query (
759
+ await this . pool . query (
762
760
`INSERT INTO relationships (id, "userA", "userB", "userId")
763
761
VALUES ($1, $2, $3, $4)
764
762
RETURNING id` ,
You can’t perform that action at this time.
0 commit comments