Skip to content

Commit e56b6be

Browse files
committed
Merge pull request sql-js#138 from dinedal/master
Update to SQLite 3.11.0 and add custom functions
2 parents be241c9 + 637ae7c commit e56b6be

18 files changed

+324963
-222776
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ EMSCRIPTEN?=/usr/bin
44

55
EMCC=$(EMSCRIPTEN)/emcc
66

7-
CFLAGS=-DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DLONGDOUBLE_TYPE=double -DSQLITE_INT64_TYPE="long long int" -DSQLITE_THREADSAFE=0
7+
CFLAGS=-DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_DISABLE_LFS -DLONGDOUBLE_TYPE=double -DSQLITE_INT64_TYPE="long long int" -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS
88

99
all: js/sql.js
1010

11-
debug: EMFLAGS= -O1 -g -s INLINING_LIMIT=10
11+
# RESERVED_FUNCTION_POINTERS setting is used for registering custom functions
12+
debug: EMFLAGS= -O1 -g -s INLINING_LIMIT=10 -s RESERVED_FUNCTION_POINTERS=64
1213
debug: js/sql-debug.js
1314

14-
optimized: EMFLAGS= --memory-init-file 0 --closure 1 -O3 -s INLINING_LIMIT=50
15+
optimized: EMFLAGS= --memory-init-file 0 --closure 1 -O3 -s INLINING_LIMIT=50 -s RESERVED_FUNCTION_POINTERS=64
1516
optimized: js/sql-optimized.js
1617

1718
js/sql.js: optimized

c/sqlite3.c

Lines changed: 72967 additions & 36488 deletions
Large diffs are not rendered by default.

c/sqlite3.h

Lines changed: 1803 additions & 658 deletions
Large diffs are not rendered by default.

coffee/api-data.coffee

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ SQLite.FLOAT=2
3939
SQLite.TEXT=3
4040
SQLite.BLOB=4
4141
SQLite.NULL=5
42+
43+
# Encodings, used for registering functions.
44+
SQLite.UTF8=1

0 commit comments

Comments
 (0)