@capacitor-community/sqlite 4.6.3 → 4.8.0-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
  <a href="https://www.npmjs.com/package/@capacitor-community/sqlite"><img src="https://img.shields.io/npm/dw/@capacitor-community/sqlite?style=flat-square" /></a>
17
17
  <a href="https://www.npmjs.com/package/@capacitor-community/sqlite"><img src="https://img.shields.io/npm/v/@capacitor-community/sqlite?style=flat-square" /></a>
18
18
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
19
- <a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-32-orange?style=flat-square" /></a>
19
+ <a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-33-orange?style=flat-square" /></a>
20
20
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
21
21
  </p>
22
22
 
@@ -251,6 +251,7 @@ npm install --save-dev @types/sqlite3
251
251
 
252
252
  - [Biometric Authentication](https://github.com/capacitor-community/sqlite/blob/master/docs/Biometric-Authentication.md)
253
253
 
254
+ - [Enable SQLite Schema Error Syntax Highlighting](https://github.com/capacitor-community/sqlite/blob/master/docs/SyntaxScanner-For-SQLite-Code.md)
254
255
 
255
256
  ## Applications demonstrating the use of the plugin and related documentation
256
257
 
@@ -349,6 +350,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
349
350
  <a href="https://github.com/eppineda" title="eppineda"><img src="https://github.com/eppineda.png?size=100" width="50" height="50" /></a>
350
351
  <a href="https://github.com/patdx" title="patdx"><img src="https://github.com/patdx.png?size=100" width="50" height="50" /></a>
351
352
  <a href="https://github.com/folsze" title="folsze"><img src="https://github.com/folsze.png?size=100" width="50" height="50" /></a>
353
+ <a href="https://github.com/pranav-singhal" title="pranav-singhal"><img src="https://github.com/pranav-singhal.png?size=100" width="50" height="50" /></a>
352
354
  </p>
353
355
 
354
356
 
@@ -547,14 +547,15 @@ public class ImportFromJson {
547
547
  if (row.get(idxDelete).equals(1)) {
548
548
  // Delete
549
549
  isUpdate = false;
550
- stmt =
551
- new StringBuilder("DELETE FROM ")
552
- .append(tableName)
553
- .append(" WHERE ")
554
- .append(tColNames.get(0))
555
- .append(" = ")
556
- .append(row.get(0))
557
- .toString();
550
+ Object key = tColNames.get(0);
551
+ StringBuilder sbQuery = new StringBuilder("DELETE FROM ")
552
+ .append(tableName)
553
+ .append(" WHERE ")
554
+ .append(tColNames.get(0))
555
+ .append(" = ");
556
+ if (key instanceof Integer) sbQuery.append(row.get(0)).append(";");
557
+ if (key instanceof String) sbQuery.append("'").append(row.get(0)).append("';");
558
+ stmt = sbQuery.toString();
558
559
  }
559
560
  }
560
561
  if (isUpdate) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor-community/sqlite",
3
- "version": "4.6.3",
3
+ "version": "4.8.0-1",
4
4
  "description": "Community plugin for native & electron SQLite databases",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -56,11 +56,11 @@
56
56
  "prepublishOnly": "npm run build && npm run build-electron && npm run docgen"
57
57
  },
58
58
  "devDependencies": {
59
- "@capacitor/android": "^4.6.3",
60
- "@capacitor/cli": "^4.6.3",
61
- "@capacitor/core": "^4.6.3",
59
+ "@capacitor/android": "^4.8.0",
60
+ "@capacitor/cli": "^4.8.0",
61
+ "@capacitor/core": "^4.8.0",
62
62
  "@capacitor/docgen": "^0.0.17",
63
- "@capacitor/ios": "^4.6.3",
63
+ "@capacitor/ios": "^4.8.0",
64
64
  "@ionic/eslint-config": "^0.3.0",
65
65
  "@ionic/prettier-config": "^1.0.1",
66
66
  "@ionic/swiftlint-config": "^1.1.2",
@@ -95,6 +95,6 @@
95
95
  }
96
96
  },
97
97
  "dependencies": {
98
- "jeep-sqlite": "^2.3.1"
98
+ "jeep-sqlite": "^2.3.4"
99
99
  }
100
100
  }
package/src/web.ts CHANGED
@@ -78,7 +78,7 @@ export class CapacitorSQLiteWeb
78
78
  this.notifyListeners('sqliteSaveDatabaseToDiskEvent', event.detail);
79
79
  },
80
80
  );
81
-
81
+
82
82
  if (!this.isWebStoreOpen) {
83
83
  this.isWebStoreOpen = await this.jeepSqliteElement.isStoreOpen();
84
84
  }