You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds deprecations in preparation for `pg@7.0`
- deprecate using event emitters on automatically created results from client.query.
- deprecate query.promise() - it should never have been a public method and it's not documented. I need to do better about using _ prefix on private methods in the future.
- deprecate singleton pool on the `pg` object. `pg.connect`, `pg.end`, and `pg.cancel`.
Copy file name to clipboardExpand all lines: lib/utils.js
+18-1Lines changed: 18 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@
6
6
* README.md file in the root directory of this source tree.
7
7
*/
8
8
9
+
varutil=require('util');
10
+
9
11
vardefaults=require('./defaults');
10
12
11
13
functionescapeElement(elementRepresentation){
@@ -137,11 +139,26 @@ function normalizeQueryConfig (config, values, callback) {
137
139
returnconfig;
138
140
}
139
141
142
+
varqueryEventEmitterOverloadDeprecationMessage='Using the automatically created return value from client.query as an event emitter is deprecated. Please see the upgrade guide at https://node-postgres.com/guides/upgrading';
0 commit comments