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

This commit is contained in:
2023-06-06 13:23:27 -05:00
parent 3bc6a56516
commit f451850601

View File

@@ -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));