@@ -10,6 +10,8 @@ var Connection = require(__dirname + '/connection');
1010var CopyFromStream = require ( __dirname + '/copystream' ) . CopyFromStream ;
1111var CopyToStream = require ( __dirname + '/copystream' ) . CopyToStream ;
1212
13+ var deprecate = require ( 'deprecate' ) ;
14+
1315var Client = function ( config ) {
1416 EventEmitter . call ( this ) ;
1517
@@ -256,11 +258,21 @@ Client.prototype.query = function(config, values, callback) {
256258//prevents client from otherwise emitting 'drain' event until 'resumeDrain' is
257259//called
258260Client . prototype . pauseDrain = function ( ) {
261+ deprecate ( 'Client.prototype.pauseDrain is deprecated and will be removed it v1.0.0 (very soon)' ,
262+ 'please see the following for more details:' ,
263+ 'https://github.com/brianc/node-postgres/wiki/pg' ,
264+ 'https://github.com/brianc/node-postgres/issues/227' ,
265+ 'https://github.com/brianc/node-postgres/pull/274' ) ;
259266 this . _drainPaused = 1 ;
260267} ;
261268
262269//resume raising 'drain' event
263270Client . prototype . resumeDrain = function ( ) {
271+ deprecate ( 'Client.prototype.resumeDrain is deprecated and will be removed it v1.0.0 (very soon)' ,
272+ 'please see the following for more details:' ,
273+ 'https://github.com/brianc/node-postgres/wiki/pg' ,
274+ 'https://github.com/brianc/node-postgres/issues/227' ,
275+ 'https://github.com/brianc/node-postgres/pull/274' ) ;
264276 if ( this . _drainPaused > 1 ) {
265277 this . emit ( 'drain' ) ;
266278 }
0 commit comments