Commit ef34faff by Eric Fredricksen Committed by Eric Fredricksen

Fix bug when query called with the empty string

parent 651cf679
......@@ -6,25 +6,17 @@ import os, sys, time
#filenames = sys.argv[1:]
filenames = ["sqlite3_bindings.cc", "wscript", "sqlite.js", "test.js"]
mdname = "README"
def handler():
os.system("clear; rm -f test.db")
os.system("node-waf build && node test.js && sqlite3 test.db .dump");
mtime = []
mdtime = None
while True:
m = [os.stat(filename).st_mtime for filename in filenames]
if mtime != m:
handler()
mtime = m
m = os.stat(mdname).st_mtime
if mdtime != m:
os.system("Markdown.pl -v < %s > %s.html" % (mdname, mdname))
print mdname + ".html updated"
mdtime = m
time.sleep(1)
......@@ -42,7 +42,7 @@ DatabaseSync.prototype.query = function (sql, bindings, callback) {
}
var all = this.performQuery(sql, bindings);
if (all.length == 0) {
var result = None;
var result = null;
} else {
for (var i = 0; i < all.length; ++i) {
var resultset = all[i];
......
......@@ -79,6 +79,10 @@ db.transaction(function(tx) {
});
});
var na = db.query("");
asserteq(na, null);
db.close();
sys.puts("OK\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment