DO NOT USE - SWITCHED TO PHP INSTEAD - Added code to make database query

master
Aadhavan Srinivasan 2 years ago
parent 3bc6a56516
commit f451850601

@ -1,3 +1,5 @@
console.log('Beginning database execution');
const cassandra = require('cassandra-driver');
const client = new cassandra.Client({
@ -5,4 +7,8 @@ const client = new cassandra.Client({
keyspace: 'glink',
});
const query =
const query = 'SELECT name FROM data WHERE id = ?';
console.log(query);
client.execute(query, [5]).then(result => console.log('User name is %s',result.rows[0].name));

Loading…
Cancel
Save