Comparing version 0.3.0 to 0.4.0
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); | ||
}; |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67342
31
782
225