Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pg-cursor

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-cursor - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

test/no-data-handling.js

22

index.js

@@ -35,7 +35,15 @@ var Result = require('./pg').Result

con.flush()
con.once('noData', ifNoData)
con.once('rowDescription', function () {
con.removeListener('noData', ifNoData);
});
function ifNoData () {
self.state = 'idle'
self._shiftQueue();
}
}
Cursor.prototype.handleRowDescription = function(msg) {
this._result.addFields(msg.fields)
this.state = 'idle'
Cursor.prototype._shiftQueue = function () {
if(this._queue.length) {

@@ -46,2 +54,8 @@ this._getRows.apply(this, this._queue.shift())

Cursor.prototype.handleRowDescription = function(msg) {
this._result.addFields(msg.fields)
this.state = 'idle'
this._shiftQueue();
}
Cursor.prototype.handleDataRow = function(msg) {

@@ -108,3 +122,3 @@ var row = this._result.parseRow(msg.fields)

Cursor.prototype.end = function(cb) {
if(this.statue != 'initialized') {
if(this.state != 'initialized') {
this.connection.sync()

@@ -111,0 +125,0 @@ }

4

package.json
{
"name": "pg-cursor",
"version": "0.1.3",
"version": "0.2.0",
"description": "",

@@ -10,3 +10,3 @@ "main": "index.js",

"scripts": {
"test": "node test/"
"test": "mocha test/"
},

@@ -13,0 +13,0 @@ "author": "Brian M. Carlson",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc