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

sqb

Package Overview
Dependencies
Maintainers
1
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sqb - npm Package Compare versions

Comparing version 0.4.12 to 0.4.13

27

lib/connect/rowstream.js

@@ -24,2 +24,3 @@ /* SQB

this._ignoreNulls = !!(options && options.ignoreNulls);
this._limit = options ? options.limit : undefined;
if (resultSet)

@@ -85,3 +86,2 @@ this._open(resultSet);

return self.once('open', () => self._read());
if (self._rowNum === 0) {

@@ -102,3 +102,18 @@ self._rowNum++;

if (self._resultSet.closed || self._resultSet._fetchedAll) {
let fetchCount = self._resultSet ? self._resultSet._prefetchRows : 0;
if (self._limit)
fetchCount = Math.min(fetchCount, self._limit - self._rowNum + 1);
if (self._fetchedAll || self._resultSet.closed || fetchCount <= 0) {
if (!self._closed) {
self._closed = true;
const summary = {
numRows: self._rowNum,
eof: !(self._resultSet && !self._resultSet.eof)
};
self.emit('summary', summary);
let s = JSON.stringify(summary);
s = s.substring(1, s.length - 1);
s = s ? ',' + s : '';
self.push(']' + s + '}');
}
self.push(null);

@@ -109,7 +124,7 @@ return;

if (self._fetchedRows && self._fetchedRows.length) {
self._rowNum++;
self._pushRow(self._fetchedRows.shift());
self._rowNum++;
} else {
const fetchCount = self._resultSet._prefetchRows;
self._resultSet.next({

@@ -129,6 +144,6 @@ fetchCount,

if (!rows) {
self.push('], "numRows": ' + String(self._rowNum) + '}');
self._fetchedAll = true;
} else {
self._rowNum++;
self._pushRow(self._fetchedRows.shift());
self._rowNum++;
}

@@ -135,0 +150,0 @@ });

{
"name": "sqb",
"description": "Plugin-driven, multi-dialect SQL query builder and Database connection framework for JavaScript",
"version": "0.4.12",
"version": "0.4.13",
"author": "Panates Ltd.",

@@ -6,0 +6,0 @@ "contributors": [

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