I want to execute this query which I have written in cql by using Async Await functions.
client.execute('select * from users).then(res => {
console.log('hello user');
}, err => {
console.log(err);
});
Can someone tell me the exact translation of this query into Async Await functions.
I solved it but I am not deleting this post as it maybe can help somebody.
app.get('/', async(req,res) => {
const res1 = await client.execute('select * from users);
var user = res1.rows[0];
console.log('successfull');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With