Skip to content

Commit e9f7bc9

Browse files
author
Paul Bergeron
committed
Adds extension-functions.c from http://www.sqlite.org/contrib?orderby=date to this distribution.
Description: > Provide mathematical and string extension functions for SQL queries using the loadable extensions mechanism. Math: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi. String: replicate, charindex, leftstr, rightstr, ltrim, rtrim, trim, replace, reverse, proper, padl, padr, padc, strfilter. Aggregate: stdev, variance, mode, median, lower_quartile, upper_quartile.
1 parent c555301 commit e9f7bc9

File tree

10 files changed

+227672
-218339
lines changed

10 files changed

+227672
-218339
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ js/sql.js: optimized
2121
js/sql%.js: js/shell-pre.js js/sql%-raw.js js/shell-post.js
2222
cat $^ > $@
2323

24-
js/sql%-raw.js: c/sqlite3.bc js/api.js exported_functions
25-
$(EMCC) $(EMFLAGS) -s EXPORTED_FUNCTIONS=@exported_functions c/sqlite3.bc --post-js js/api.js -o $@
24+
js/sql%-raw.js: c/sqlite3.bc js/api.js exported_functions c/extension-functions.bc
25+
$(EMCC) $(EMFLAGS) -s EXPORTED_FUNCTIONS=@exported_functions c/extension-functions.bc c/sqlite3.bc --post-js js/api.js -o $@
2626

2727
js/api.js: coffee/api.coffee coffee/exports.coffee coffee/api-data.coffee
2828
coffee --bare --compile --join $@ --compile $^
@@ -43,5 +43,7 @@ module.tar.gz: test package.json AUTHORS README.md js/sql.js
4343
tar --create --gzip $^ > $@
4444

4545
clean:
46-
rm -rf js/sql*.js js/api.js js/sql*-raw.js c/sqlite3.bc
46+
rm -rf js/sql*.js js/api.js js/sql*-raw.js c/sqlite3.bc c/extension-functions.bc
4747

48+
c/extension-functions.bc: c/extension-functions.c
49+
$(EMCC) $(CFLAGS) -s LINKABLE=1 c/extension-functions.c -o c/extension-functions.bc

0 commit comments

Comments
 (0)