DO NOT USE - SWITCHED TO PHP INSTEAD - Added code to make database query
This commit is contained in:
@@ -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));
|
||||
|
Reference in New Issue
Block a user