-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3927 from NoelDeMartin/MOBILE-4304
MOBILE-4304: Replace WebSQL with sqlite-wasm
- Loading branch information
Showing
57 changed files
with
2,477 additions
and
1,880 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
diff --git a/node_modules/@sqlite.org/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-bundler-friendly.mjs b/node_modules/@sqlite.org/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-bundler-friendly.mjs | ||
index b86a0aa..1be2b82 100644 | ||
--- a/node_modules/@sqlite.org/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-bundler-friendly.mjs | ||
+++ b/node_modules/@sqlite.org/sqlite-wasm/sqlite-wasm/jswasm/sqlite3-bundler-friendly.mjs | ||
@@ -533,7 +533,7 @@ var sqlite3InitModule = (() => { | ||
wasmBinaryFile = locateFile(wasmBinaryFile); | ||
} | ||
} else { | ||
- wasmBinaryFile = new URL('sqlite3.wasm', import.meta.url).href; | ||
+ wasmBinaryFile = '/assets/lib/sqlite3/sqlite3.wasm'; | ||
} | ||
|
||
function getBinary(file) { | ||
@@ -10913,6 +10913,10 @@ var sqlite3InitModule = (() => { | ||
} | ||
}, | ||
|
||
+ lastInsertRowId: function () { | ||
+ return capi.sqlite3_last_insert_rowid(affirmDbOpen(this).pointer); | ||
+ }, | ||
+ | ||
dbFilename: function (dbName = 'main') { | ||
return capi.sqlite3_db_filename(affirmDbOpen(this).pointer, dbName); | ||
}, | ||
@@ -11877,12 +11881,14 @@ var sqlite3InitModule = (() => { | ||
if (!hadColNames) rc.columnNames = []; | ||
|
||
rc.callback = function (row, stmt) { | ||
+ const rowId = rc.sql.includes('INSERT') ? db.lastInsertRowId() : undefined; | ||
wState.post( | ||
{ | ||
type: theCallback, | ||
columnNames: rc.columnNames, | ||
rowNumber: ++rowNumber, | ||
row: row, | ||
+ rowId, | ||
}, | ||
wState.xfer, | ||
); | ||
@@ -12522,7 +12528,7 @@ var sqlite3InitModule = (() => { | ||
return promiseResolve_(sqlite3); | ||
}; | ||
const W = new Worker( | ||
- new URL('sqlite3-opfs-async-proxy.js', import.meta.url), | ||
+ '/assets/lib/sqlite3/sqlite3-opfs-async-proxy.js', | ||
); | ||
setTimeout(() => { | ||
if (undefined === promiseWasRejected) { | ||
@@ -13445,7 +13451,7 @@ var sqlite3InitModule = (() => { | ||
}); | ||
return thePromise; | ||
}; | ||
- installOpfsVfs.defaultProxyUri = 'sqlite3-opfs-async-proxy.js'; | ||
+ installOpfsVfs.defaultProxyUri = '/assets/lib/sqlite3/sqlite3-opfs-async-proxy.js'; | ||
globalThis.sqlite3ApiBootstrap.initializersAsync.push( | ||
async (sqlite3) => { | ||
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+313 Bytes
(100%)
...s/behat/snapshots/test-basic-usage-of-forum-activity-in-app-reply-a-post_14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+461 Bytes
(100%)
...hat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-12 Bytes
(100%)
...hat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_38.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.