exports.allProbes = function() {
var rows = db.all(\"SELECT * FROM probes;\");
return rows;
};
main:
var json_values = allPro
You will not be able to do that with sqlite3. With sqlite3 module the only available mode of operation is asynchronous execution, and you will have to use a callback. Eg.
exports.allProbes = function(callback) {
db.all("SELECT * FROM probes;", function(err, all) {
callback(err, all);
});
};
Then in your code:
var json_values;
allProbes(function(err, all) {
json_values = all;
});
Check sqlite3 API Docs.