Saturday, 10 June 2017

Alternative way to get response from a database in node js?

Im using MySql to store data from a node.js server

All the responses from a Query sent through node.js Conection.Query function is recieved through a callback function...

I was wondering if this is because is MySql...

is there any alternative for databases to get an answer immediately?

for example, this is the standard way im doing it now.

Self.Conection.query(Query, function(err, result) {
    //handling result here
    });

Is there any way to achieve the next example?

var response=Query("select * from table");



via AlexAdagio

No comments:

Post a Comment