New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rethinkdbdash

Package Overview
Dependencies
Maintainers
1
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rethinkdbdash - npm Package Compare versions

Comparing version 1.16.0 to 1.16.1

35

lib/connection.js

@@ -268,13 +268,32 @@ var net = require('net');

cursor._push({done: false, response: response});
if (self.options[token].profile === true) {
result = {
profile: response.p,
result: cursor
if ((self.options[token].stream === true || self.r._options.stream === true)) {
stream = new Stream(cursor);
if (self.options[token].profile === true) {
result = {
profile: response.p,
result: stream
}
//Next batches will still have a profile (even though it's the same). So it's safe to keep the options
//self.options[token].profile = false;
}
//Next batches will still have a profile (even though it's the same). So it's safe to keep the options
//self.options[token].profile = false;
else {
result = stream
}
}
else {
result = cursor
// The default behavior is to create a cursor for feeds
if (self.options[token].profile === true) {
result = {
profile: response.p,
result: cursor
}
//Next batches will still have a profile (even though it's the same). So it's safe to keep the options
//self.options[token].profile = false;
}
else {
result = cursor
}
}

@@ -281,0 +300,0 @@ currentResolve(result);

{
"name": "rethinkdbdash",
"version": "1.16.0",
"version": "1.16.1",
"description": "A Node.js driver for RethinkDB with promises and a connection pool",

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

@@ -99,2 +99,47 @@ var config = require('./config.js');

It("changes() should return a stream", function* (done) {
try {
var data = [{}, {}, {}, {}];
stream = yield r.db(dbName).table(tableName).changes().run({stream: true});
assert(stream);
assert(stream instanceof Readable);
var count = 0;
stream.on('data', function() {
count++;
if (count === data.length) {
done();
stream.close();
}
});
yield r.db(dbName).table(tableName).insert(data).run();
}
catch(e) {
done(e);
}
})
It("get().changes() should return a stream", function* (done) {
try {
stream = yield r.db(dbName).table(tableName).get(1).changes().run({stream: true});
assert(stream);
assert(stream instanceof Readable);
var count = 0;
stream.on('data', function() {
count++;
if (count === 3) {
done();
stream.close();
}
});
yield r.db(dbName).table(tableName).insert({id: 1}).run();
yield r.db(dbName).table(tableName).get(1).update({update: 1}).run();
yield r.db(dbName).table(tableName).get(1).update({update: 2}).run();
}
catch(e) {
done(e);
}
})
It("`table` should return a stream - testing empty SUCCESS_COMPLETE", function* (done) {

@@ -101,0 +146,0 @@ var i=0;

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