Allow configuration options for Postgres (#2873)
* Allow configuration options for Postgres * Fix the use of incorrect options object. * Refactor and test the postgres config parser. * Remove unnecessary try/catch * Remove unnecessary try/catch * Add blank line at the end of the test file * Rename file for consistency purposes
This commit is contained in:
committed by
Florent Vilmart
parent
7af320932a
commit
de36d9640b
@@ -1,4 +1,4 @@
|
||||
const pgp = require('pg-promise')();
|
||||
import { createClient } from './PostgresClient';
|
||||
|
||||
const PostgresRelationDoesNotExistError = '42P01';
|
||||
const PostgresDuplicateRelationError = '42P07';
|
||||
@@ -379,9 +379,10 @@ export class PostgresStorageAdapter {
|
||||
constructor({
|
||||
uri,
|
||||
collectionPrefix = '',
|
||||
databaseOptions
|
||||
}) {
|
||||
this._collectionPrefix = collectionPrefix;
|
||||
this._client = pgp(uri);
|
||||
this._client = createClient(uri, databaseOptions);
|
||||
}
|
||||
|
||||
_ensureSchemaCollectionExists() {
|
||||
|
||||
Reference in New Issue
Block a user