Just like in topic, the callback always returns the null value and its the only value returned in case of the success.
can you post a working testcase that replicates the issue?
There are several ways to execute a query: https://github.com/developmentseed/node-sqlite3/wiki/API
By design, .run() returns null as the first parameter if no error occurs, and doesn't return data if the query was a select statement. To get the data, use .get() instead.
To query .lastID, see this code example:
db.run("INSERT INTO foo ...", function(err) {
// err is null if insertion was successful
console.warn("inserted id:", this.lastID);
});
Most helpful comment
To query
.lastID, see this code example: