brianc / node-pg-native

Native (C/C++) bindings to PostgreSQL with sync and async options.
247 stars 44 forks source link

Version 2.0 #56

Closed brianc closed 7 years ago

brianc commented 7 years ago

Upgrading to support multiple result-sets returned from a multi-command simple query.

Example:

client.query('SELECT 1 as num; SELECT 2 as othernum;', (err, rows) => {
  // pg-native @ 1.x rows == [{ num: 1 }, { othernum: 2 }]
  // pg-native @ 2.x rows == [[ { num: 1 } ], [ { othernum: 2 }]]
})

That is a breaking change though relying on the old behavior was never really a good idea as you had no indication of which row came from which result-set.

Everything else should behave as it did before.

Additions: