Bulk Insert

6 views
Skip to first unread message

raja....@gmail.com

unread,
Mar 10, 2015, 4:11:43 AM3/10/15
to hel...@googlegroups.com
Hi i'm new to cassandra and express.js

I created a post method to create one record..

router.post('/', function(req, res, next) {
var insert = 'INSERT INTO heatmap (id, x, y, value) values(?,?,?,?)',
params = [Number(req.body.id),Number(req.body.x),Number(req.body.y),Number(req.body.value)];
req.app.get('cassandra').cql(insert,params,function(err,result){
if(err){
return next(err);
}
res.redirect('/');
});
});


I need to change this to insert multiple array of records

Reply all
Reply to author
Forward
0 new messages