You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
362 B
JavaScript
15 lines
362 B
JavaScript
console.log('Beginning database execution');
|
|
|
|
const cassandra = require('cassandra-driver');
|
|
|
|
const client = new cassandra.Client({
|
|
contactPoints: ['127.0.0.1:9042'],
|
|
keyspace: 'glink',
|
|
});
|
|
|
|
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));
|