We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8b4f42 commit d3160c1Copy full SHA for d3160c1
1 file changed
src/index.ts
@@ -312,7 +312,8 @@ interface IDBConnection {
312
asyncExecuteSql: (
313
query: string,
314
params: any[] | undefined,
315
- cb: (res: QueryResult) => void
+ cb: (res: QueryResult) => void,
316
+ fail: (msg: string) => void
317
) => void;
318
executeSqlBatch: (
319
commands: SQLBatchParams[],
@@ -372,10 +373,14 @@ export const openDatabase = (
372
373
374
sql: string,
375
376
377
378
) => {
379
try {
380
sqlite.asyncExecuteSql(options.name, sql, params, (response) => {
381
+ if (response.status === 1) {
382
+ fail(response.message);
383
+ }
384
enhanceQueryResult(response);
385
cb(response);
386
});
0 commit comments