不要怂,就是干,撸起袖子干!

Commit 7f096c03 by Will Whitney

Add a case for native pg client with different callback format

When using the native pg bindings, the `connectCallback` has no `client` argument passed to it. As a result, self.client should continue to be used here.
1 parent cfbec56a
Showing with 5 additions and 0 deletions
...@@ -113,6 +113,11 @@ module.exports = (function() { ...@@ -113,6 +113,11 @@ module.exports = (function() {
self.client = client self.client = client
emitter.emit('success', done) emitter.emit('success', done)
}) })
} else if (self.config.native) {
self.client.query("SET TIME ZONE 'UTC'").on('end', function() {
self.isConnected = true
emitter.emit('success', done)
})
} else { } else {
done && done() done && done()
self.client = null self.client = null
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!