fix(psql): update pg client

This commit is contained in:
Ruben Fiszel
2023-02-15 12:17:42 +01:00
parent 3e5950a396
commit a2fbc57025
+2 -3
View File
@@ -25,9 +25,8 @@ import { type Resource } from "./mod.ts"
export function pgClient(
db: Resource<"postgresql">
) {
db.database = db.dbname
db.hostname = db.host
return new Client(db)
const databaseUrl = 'postgresql://' + db.user + ':' + db.password + '@' + db.host + ':' + db.port + '/' + db.dbname + '?sslmode=' + db.sslmode
return new Client(databaseUrl)
}
/**