You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code was highlighted as wrong and would throw an error: "sqlBatch expects 1 argument, 3 given".
I figured out the problem was in node_modules/@ionic_native/sqlite/index.d.ts line 77: sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any>;
While the definition in node_modules/cordova_sqlite_storage/WWW/SQLitePlugin.js line 265: SQLitePlugin.prototype.sqlBatch = function(sqlStatements, success, error) { ...
To fix this I changed the line in index.d.ts to: sqlBatch(sqlStatements: Array<string | string[] | any>, success: any, error: any);
Second thought, I'm not sure if this but should be posted on this repo, or should go to Ionic team. Let me know. Thanks!
The text was updated successfully, but these errors were encountered:
Thanks again for reporting. If you have a chance to raise a PR to fix the issue I am sure it will be appreciated. I am sure they are over busy, just like everyone else:)
I stumbled across a strange bug while executing a simple
sqlBatch
in an Ionic project:db.sqlBatch( myBatchArray, () => { console.log('Executed BATCH INSERT SQL'); }, () => { console.log('FAILED BATCH INSERT SQL'); } );
This code was highlighted as wrong and would throw an error: "sqlBatch expects 1 argument, 3 given".
I figured out the problem was in
node_modules/@ionic_native/sqlite/index.d.ts
line 77:sqlBatch(sqlStatements: Array<string | string[] | any>): Promise<any>;
While the definition in
node_modules/cordova_sqlite_storage/WWW/SQLitePlugin.js
line 265:SQLitePlugin.prototype.sqlBatch = function(sqlStatements, success, error) { ...
To fix this I changed the line in index.d.ts to:
sqlBatch(sqlStatements: Array<string | string[] | any>, success: any, error: any);
Second thought, I'm not sure if this but should be posted on this repo, or should go to Ionic team. Let me know. Thanks!
The text was updated successfully, but these errors were encountered: