|
50 | 50 | * @module SqlJs |
51 | 51 | */ |
52 | 52 | // Wait for preRun to run, and then finish our initialization |
53 | | -Module.onRuntimeInitialized = function onRuntimeInitialized() { |
| 53 | +Module["onRuntimeInitialized"] = function onRuntimeInitialized() { |
54 | 54 | // Declare toplevel variables |
55 | 55 | // register, used for temporary stack values |
56 | 56 | var apiTemp = stackAlloc(4); |
57 | | - var cwrap = Module.cwrap; |
| 57 | + var cwrap = Module["cwrap"]; |
58 | 58 | // Null pointer |
59 | 59 | var NULL = 0; |
60 | 60 | // SQLite enum |
@@ -433,7 +433,7 @@ Module.onRuntimeInitialized = function onRuntimeInitialized() { |
433 | 433 | for (var field = 0; field < ref; field += 1) { |
434 | 434 | switch (sqlite3_column_type(this.stmt, field)) { |
435 | 435 | case SQLITE_INTEGER: |
436 | | - var getfunc = config.useBigInt |
| 436 | + var getfunc = config["useBigInt"] |
437 | 437 | ? this.getBigInt(field) |
438 | 438 | : this.getNumber(field); |
439 | 439 | results1.push(getfunc); |
@@ -1301,11 +1301,11 @@ Module.onRuntimeInitialized = function onRuntimeInitialized() { |
1301 | 1301 | aggregateFunctions |
1302 | 1302 | ) { |
1303 | 1303 | // Default initializer and finalizer |
1304 | | - var init = aggregateFunctions.init |
| 1304 | + var init = aggregateFunctions["init"] |
1305 | 1305 | || function init() { return null; }; |
1306 | | - var finalize = aggregateFunctions.finalize |
| 1306 | + var finalize = aggregateFunctions["finalize"] |
1307 | 1307 | || function finalize(state) { return state; }; |
1308 | | - var step = aggregateFunctions.step; |
| 1308 | + var step = aggregateFunctions["step"]; |
1309 | 1309 |
|
1310 | 1310 | if (!step) { |
1311 | 1311 | throw "An aggregate function must have a step function in " + name; |
@@ -1572,5 +1572,5 @@ Module.onRuntimeInitialized = function onRuntimeInitialized() { |
1572 | 1572 | /* eslint-enable no-self-assign */ |
1573 | 1573 |
|
1574 | 1574 | // export Database to Module |
1575 | | - Module.Database = Database; |
| 1575 | + Module["Database"] = Database; |
1576 | 1576 | }; |
0 commit comments