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

express-cassandra

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-cassandra - npm Package Compare versions

Comparing version 0.4.10 to 0.4.11

15

lib/expressCassandra.js

@@ -88,2 +88,17 @@ var fs = require('fs');

doBatch: function(queries, callback) {
var randomModel = this.modelInstance[Object.keys(this.modelInstance)[0]];
var builtQueries = [];
for(var i=0;i<queries;i++) {
builtQueries.push({
query: queries[i],
params: []
});
}
randomModel.execute_batch(builtQueries, function(err){
if(err) callback(err);
else callback();
});
},
get instance() {

@@ -90,0 +105,0 @@ return this.modelInstance;

2

lib/orm/base_model.js

@@ -607,2 +607,4 @@ var util = require('util'),

field_relation = {'$eq': field_relation};
else if(typeof field_relation == 'object' && (field_relation instanceof cql.types.Uuid || field_relation instanceof cql.types.TimeUuid))
field_relation = {'$eq': field_relation.toString()};
else if(typeof field_relation != 'object')

@@ -609,0 +611,0 @@ throw(build_error('model.find.invalidrelob', k, field_relation));

2

package.json
{
"name": "express-cassandra",
"version": "0.4.10",
"version": "0.4.11",
"dependencies": {

@@ -5,0 +5,0 @@ "async": "^1.0.0",

@@ -6,2 +6,3 @@ var models = require('../index');

var current_time = Date.now();
var event_id = models.timeuuid();

@@ -293,3 +294,3 @@ describe('Unit Tests', function(){

query: "INSERT INTO event (email, id, body) VALUES (?, ?, ?)",
params: ['hello1@h.com', models.timeuuid(), 'hello1']
params: ['hello1@h.com', event_id, 'hello1']
},

@@ -313,2 +314,15 @@ {

describe('#find after batch events',function(){
it('should find the event with timeuuid in query', function(done) {
models.instance.Event.findOne({email: 'hello1@h.com', id: event_id}, function(err, event){
if(err) throw err;
models.instance.Event.findOne({email: 'hello1@h.com', id: event.id}, function(err, event){
if(err) throw err;
event.body.should.equal('hello1');
done();
});
});
});
});
describe('#close cassandra connection',function(){

@@ -315,0 +329,0 @@ it('should close connection to cassandra without errors', function(done) {

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