Skip to content

Commit dff88cd

Browse files
committed
fix parameters to sqlite and add a test for what was broken before
1 parent 9cc0943 commit dff88cd

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
EMSCRIPTEN=~/Dev/emscripten
33
EMCC=$(EMSCRIPTEN)/emcc -O2
44
# -s INLINING_LIMIT=0
5-
CFLAGS=-DSQLITE_OMIT_LOAD_EXTENSION
5+
CFLAGS=-DSQLITE_DISABLE_LFS -DLONGDOUBLE_TYPE=double -DSQLITE_INT64_TYPE="long long int" -DSQLITE_THREADSAFE=0
66

77
all: sql.js benchmark.html benchmark
88

sql.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,18 @@ function testPersistence() {
5858
db2.close();
5959
}
6060

61+
function testDateTime() {
62+
var db = SQL.open();
63+
check(db.exec("SELECT datetime('2012-04-16 12:35:57', '+1 days');"), [
64+
[{"column":"datetime('2012-04-16 12:35:57', '+1 days')","value":"2012-04-17 12:35:57"}]
65+
]);
66+
}
67+
6168
// Run tests
6269

6370
testBasics();
6471
testPersistence();
72+
testDateTime();
6573

6674
print('ok.');
6775

0 commit comments

Comments
 (0)