1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Refactoring towards getting fiddle to support OPFS as a first-class citizen. Certain operations, e.g. import, export, and unlink, are not OPFS-aware.

FossilOrigin-Name: 1b923ed6438d7fef4508936e0c4bc026a368721698b1539961e3fb3140a185cb
This commit is contained in:
stephan
2022-09-24 07:36:45 +00:00
parent f75c0c7036
commit 60d9aa7c59
8 changed files with 776 additions and 754 deletions

View File

@ -148,7 +148,11 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
exports: undefined,
memory: undefined,
bigIntEnabled: (()=>{
if('undefined'!==typeof Module) return !!Module.HEAPU64;
if('undefined'!==typeof Module){
/* Emscripten module will contain HEAPU64 when build with
-sWASM_BIGINT=1, else it will not. */
return !!Module.HEAPU64;
}
return !!self.BigInt64Array;
})(),
allocExportName: 'malloc',
@ -771,7 +775,8 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
return (p && name) ? name.startsWith(p+'/') : false;
};
if(0===capi.wasm.exports.sqlite3_vfs_find(0)){
// This bit is highly arguable and is incompatible with the fiddle shell.
if(false && 0===capi.wasm.exports.sqlite3_vfs_find(0)){
/* Assume that sqlite3_initialize() has not yet been called.
This will be the case in an SQLITE_OS_KV build. */
capi.wasm.exports.sqlite3_initialize();