Skip to content

Commit

Permalink
fix: configure default client configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Apr 14, 2017
1 parent 96b6822 commit 1f50449
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const any: InternalQueryAnyType = async (connection, clientConfiguration,

const createConnection = async (
connectionConfiguration: DatabaseConfigurationType,
clientConfiguration: ClientConfigurationType
clientConfiguration: ClientConfigurationType = {}
): Promise<DatabaseSingleConnectionType> => {
const pool = new pg.Pool(connectionConfiguration);

Expand All @@ -188,7 +188,7 @@ const createConnection = async (

const createPool = (
connectionConfiguration: DatabaseConfigurationType,
clientConfiguration: ClientConfigurationType
clientConfiguration: ClientConfigurationType = {}
): DatabasePoolConnectionType => {
const pool = new pg.Pool(typeof connectionConfiguration === 'string' ? parseConnectionString(connectionConfiguration) : connectionConfiguration);

Expand Down
4 changes: 2 additions & 2 deletions src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export type ClientErrorsConfigurationType = {|
+NotFoundError?: Class<Error>
|};

export type ClientConfigurationType = {|
export type ClientConfigurationType = {
+errors?: ClientErrorsConfigurationType
|};
};

export type DatabaseConfigurationType = DatabaseConnectionUriType |
{|
Expand Down

0 comments on commit 1f50449

Please sign in to comment.