Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix bug when query called with the empty string

  • Loading branch information...
commit ef34faff6f40f0b683ec31110278abd26e697b2b 1 parent 651cf67
@grumdrig authored Eric Fredricksen committed
Showing with 5 additions and 9 deletions.
  1. +0 −8 compiloop.py
  2. +1 −1  sqlite.js
  3. +4 −0 test.js
View
8 compiloop.py
@@ -6,25 +6,17 @@
#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)
View
2  sqlite.js
@@ -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];
View
4 test.js
@@ -79,6 +79,10 @@ db.transaction(function(tx) {
});
});
+var na = db.query("");
+asserteq(na, null);
+
+
db.close();
sys.puts("OK\n");
Please sign in to comment.
Something went wrong with that request. Please try again.