aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-vtab-helper.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2024-07-24 23:58:28 +0000
committerstephan <stephan@noemail.net>2024-07-24 23:58:28 +0000
commitb16c2980b37006f433341dd4d726fcf3e1e64808 (patch)
treee7d9b03fe429e0dd7ed357d5340459ccfa0a10d4 /ext/wasm/api/sqlite3-vtab-helper.c-pp.js
parentfe225745fcff95e9de8e745daedfd3dc2a30bf61 (diff)
downloadsqlite-b16c2980b37006f433341dd4d726fcf3e1e64808.tar.gz
sqlite-b16c2980b37006f433341dd4d726fcf3e1e64808.zip
wasm minimal build: strip authorizers and JSON support (saves approx 35kb). Strip vtab support from the JS bits but cannot yet strip it from the C bits because that requires a custom-configured sqlite3.c.
FossilOrigin-Name: eb64d106551718467e0f6c6b53695410bf4c566901008e4cda8580d0f7efa7b0
Diffstat (limited to 'ext/wasm/api/sqlite3-vtab-helper.c-pp.js')
-rw-r--r--ext/wasm/api/sqlite3-vtab-helper.c-pp.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/wasm/api/sqlite3-vtab-helper.c-pp.js b/ext/wasm/api/sqlite3-vtab-helper.c-pp.js
index 7359ea39a..d78fbdbf3 100644
--- a/ext/wasm/api/sqlite3-vtab-helper.c-pp.js
+++ b/ext/wasm/api/sqlite3-vtab-helper.c-pp.js
@@ -11,10 +11,14 @@
/**
This file installs sqlite3.vtab, a namespace of helpers for use in
- the creation of JavaScript implementations virtual tables.
+ the creation of JavaScript implementations virtual tables. If built
+ without virtual table support then this function does nothing.
*/
'use strict';
globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
+ if( !sqlite3.wasm.exports.sqlite3_declare_vtab ){
+ return;
+ }
const wasm = sqlite3.wasm, capi = sqlite3.capi, toss = sqlite3.util.toss3;
const vtab = Object.create(null);
sqlite3.vtab = vtab;