Skip to content

Commit

Permalink
fix: correct binding placement
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed May 1, 2017
1 parent 6c5baf5 commit edb3df8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const createConnection = async (
let ended = false;

return {
any: any.bind(null, connection, clientConfiguration),
any: mapTaggedTemplateLiteralInvocation(any.bind(null, connection, clientConfiguration)),
end: async () => {
if (ended) {
return ended;
Expand All @@ -188,10 +188,10 @@ const createConnection = async (

return ended;
},
many: mapTaggedTemplateLiteralInvocation(many).bind(null, connection, clientConfiguration),
maybeOne: mapTaggedTemplateLiteralInvocation(maybeOne).bind(null, connection, clientConfiguration),
one: mapTaggedTemplateLiteralInvocation(one).bind(null, connection, clientConfiguration),
query: mapTaggedTemplateLiteralInvocation(query).bind(null, connection)
many: mapTaggedTemplateLiteralInvocation(many.bind(null, connection, clientConfiguration)),
maybeOne: mapTaggedTemplateLiteralInvocation(maybeOne.bind(null, connection, clientConfiguration)),
one: mapTaggedTemplateLiteralInvocation(one.bind(null, connection, clientConfiguration)),
query: mapTaggedTemplateLiteralInvocation(query.bind(null, connection))
};
};

Expand All @@ -202,11 +202,11 @@ const createPool = (
const pool = new pg.Pool(typeof connectionConfiguration === 'string' ? parseConnectionString(connectionConfiguration) : connectionConfiguration);

return {
any: mapTaggedTemplateLiteralInvocation(any).bind(null, pool, clientConfiguration),
many: mapTaggedTemplateLiteralInvocation(many).bind(null, pool, clientConfiguration),
maybeOne: mapTaggedTemplateLiteralInvocation(maybeOne).bind(null, pool, clientConfiguration),
one: mapTaggedTemplateLiteralInvocation(one).bind(null, pool, clientConfiguration),
query: mapTaggedTemplateLiteralInvocation(query).bind(null, pool)
any: mapTaggedTemplateLiteralInvocation(any.bind(null, pool, clientConfiguration)),
many: mapTaggedTemplateLiteralInvocation(many.bind(null, pool, clientConfiguration)),
maybeOne: mapTaggedTemplateLiteralInvocation(maybeOne.bind(null, pool, clientConfiguration)),
one: mapTaggedTemplateLiteralInvocation(one.bind(null, pool, clientConfiguration)),
query: mapTaggedTemplateLiteralInvocation(query.bind(null, pool))
};
};

Expand Down

0 comments on commit edb3df8

Please sign in to comment.