Socket
Socket
Sign inDemoInstall

libpq

Package Overview
Dependencies
13
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.4.0

test/copy-in.js

42

index.js

@@ -290,2 +290,42 @@ var PQ = module.exports = require('bindings')('addon.node').PQ;

return this.$escapeIdentifier(input);
}
};
//Checks for any notifications which may have arrivied
//and returns them as a javascript object: {relname: 'string', extra: 'string', be_pid: int}
//if there are no pending notifications this returns undefined
PQ.prototype.notifies = function() {
return this.$notifies();
};
//Sends a buffer of binary data to the server
//returns 1 if the command was sent successfully
//returns 0 if the command would block (use PQ#writable here if so)
//returns -1 if there was an error
PQ.prototype.putCopyData = function(buffer) {
assert(buffer instanceof Buffer);
return this.$putCopyData(buffer);
};
//Sends a command to 'finish' the copy
//if an error message is passed, it will be sent to the
//backend and signal a request to cancel the copy in
//returns 1 if sent succesfully
//returns 0 if the command would block
//returns -1 if there was an error
PQ.prototype.putCopyEnd = function(errorMessage) {
if(errorMessage) {
return this.$putCopyEnd(errorMessage);
}
return this.$putCopyEnd();
};
//Gets a buffer of data from a copy out command
//if async is passed as true it will not block waiting
//for the result, otherwise this will BLOCK for a result.
//returns a buffer if successful
//returns 0 if copy is still in process (async only)
//returns -1 if the copy is done
//returns -2 if there was an error
PQ.prototype.getCopyData = function(async) {
return this.$getCopyData(!!async);
};

2

package.json
{
"name": "libpq",
"version": "0.3.0",
"version": "0.4.0",
"description": "Low-level native bindings to PostgreSQL libpq",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,5 +9,1 @@ var Client = require('../')

});
describe('async connecting', function() {
it('works', false);
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc