1// Example 1 - Synchronous (blocks)
2var result = database.query("SELECT * FROM hugetable");
3console.log("Query finished");
4console.log("Next line");
5
6
7// Example 2 - Asynchronous (doesn't block)
8database.query("SELECT * FROM hugetable", function(result) {
9 console.log("Query finished");
10});
11console.log("Next line");