Skip to content

7.0 #1369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 61 commits into from
Jul 18, 2017
Merged

7.0 #1369

merged 61 commits into from
Jul 18, 2017

Conversation

brianc
Copy link
Owner

@brianc brianc commented Jul 16, 2017

Notable breaking changes:

  • drop support for node < 4.x
  • client.query no longer returns an event-emitter. If a callback is supplied, it returns undefined. If no callback is supplied it returns a Promise. This was deprecated in pg@6.x
  • pg.connect and pg.end global singleton pool was removed. This was deprecated in pg@6.x
  • pg.cancel which used the global singleton pool was removed. This was deprecated in pg@6.x`
  • standardized error message fields between pure JavaScript driver and libpq driver. Pure JavaScript error fields are used throughout. This will only impact you if you were using pg.native and checking error feilds such as error.context or error.where change
  • Result from multi-statement plain text query now returned as multiple arrays instead of mangled into a single array. context

Enhancements:

  • better promisification of all APIs. connect, end, and query
  • better support for network partitions & ensuring errors from connections are bubbled up
  • overhaul of pg-pool internals & supporting connectionTimeoutMillis for a connection timeout feature in the pool

charmander and others added 30 commits June 7, 2017 22:45
* Remove unsupported Node versions 0.10 and 0.12 from CI

* Replace deprecated Buffer constructor with .from/.alloc

* Remove Promise polyfill

* Make use of Object.assign

* Remove checks for versions of Node earlier than 4

* Remove Buffer#indexOf fallback for Node 0.10
* Add client connectionString tests (#1310)

* Remove redundant tests

* Add client connectionString test

Add test to ensure { connectionString } is respected as an argument to the client constructor

* Add test for connection string property

Also fixed some legacy require statements.

* Normalize native error properties

Map native error properties to the same property names we use for errors from the JS driver.

Fixes #972
Fixes #938
Removes the default node 6 / PG 9.6 combination and adds it to the
Travis-CI matrix of combinations. That way all combinations are
defined in a single place.
Make file paths more closely match the non-native files, to make auto-complete file names slightly easier.
brianc added 24 commits June 16, 2017 21:43
Passing nothing for both the query.text and query.name is unsupported but previously crashed with an impossible to catch error.
Clients are not reusable.  This changes the client to raise errors whenever you try to reconnect a client that's already been used.  They're cheap to create: just instantiate a new one (or use the pool) 😉.

Closes #1352
This is a small change and is _kinda_ backwards compatible since the old behavior was to throw an error, but if someone was relying on anything with `.map` working as values it would break them, so it's in a major semver bump.
* Work on converting lib to standard

* Finish updating lib

* Finish linting lib

* Format test files

* Add .eslintrc with standard format

* Supply full path to eslint bin

* Move lint command to package.json

* Add eslint as dev dependency
@abenhamdine
Copy link
Contributor

Amazing !

@brianc brianc merged commit 8cc7308 into master Jul 18, 2017
@brianc brianc deleted the 7.0 branch July 18, 2017 02:53
@ashking
Copy link

ashking commented Jul 19, 2017

Excellent work! this is exactly the kind of list I was looking for!

@brianc
Copy link
Owner Author

brianc commented Jul 19, 2017

@ashking I also maintain this on every release above patch. 😄

@abenhamdine
Copy link
Contributor

Result from multi-statement text queries such as SELECT 1; SELECT 2; are now returned as an array of results instead of a single result with 1 array containing rows from both queries.

This one is the mega bonus / christmas gift 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants