(callback, sql, args = null)
| 49 | } |
| 50 | |
| 51 | async execute(callback, sql, args = null) { |
| 52 | try { |
| 53 | if (LINUX) { |
| 54 | if (args) { |
| 55 | args = new Map(Object.entries(args)); |
| 56 | } |
| 57 | var json = await SQLite.ExecuteJson(sql, args); |
| 58 | var items = JSON.parse(json); |
| 59 | items.forEach((item) => { |
| 60 | callback(item); |
| 61 | }); |
| 62 | return; |
| 63 | } |
| 64 | var data = await SQLite.Execute(sql, args); |
| 65 | data.forEach((row) => { |
| 66 | callback(row); |
| 67 | }); |
| 68 | } catch (e) { |
| 69 | this.handleSQLiteError(e); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | async executeNonQuery(sql, args = null) { |
| 74 | try { |
no test coverage detected