@capacitor-community/sqlite 5.5.0 → 5.5.1-2

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
@@ -18,7 +18,7 @@
18
18
  <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>
19
19
  <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>
20
20
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
21
- <a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-38-orange?style=flat-square" /></a>
21
+ <a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-39-orange?style=flat-square" /></a>
22
22
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
23
23
  </p>
24
24
 
@@ -401,6 +401,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
401
401
  <a href="https://github.com/cosentino" title="cosentino"><img src="https://avatars.githubusercontent.com/u/376903?s=48&v=4" width="50" height="50" /></a>
402
402
  <a href="https://github.com/Guiqft" title="Guiqft"><img src="https://avatars.githubusercontent.com/u/9392803?v=4" width="50" height="50" /></a>
403
403
  <a href="https://github.com/DawidWetzler" title="DawidWetzler"><img src="https://avatars.githubusercontent.com/u/49675685?v=4" width="50" height="50" /></a>
404
+ <a href="https://github.com/mmouterde" title="mmouterde"><img src="https://avatars.githubusercontent.com/u/733538?v=4" width="50" height="50" /></a>
404
405
  </p>
405
406
 
406
407
 
@@ -458,9 +458,12 @@ public class ImportFromJson {
458
458
  String formattedRow = null;
459
459
  formattedRow = String.join(", ", rowIndex.stream().map(item -> {
460
460
  if (item instanceof String) {
461
- StringBuilder formattedValue = new StringBuilder();
462
- formattedValue.append('"').append(item).append('"');
463
- return formattedValue.toString();
461
+ String val = (String) item;
462
+ String rVal = val;
463
+ if(val.contains("'")) {
464
+ rVal = val.replace("'","''");
465
+ }
466
+ return "'" + rVal + "'";
464
467
  } else {
465
468
  return item.toString();
466
469
  }
@@ -474,7 +477,12 @@ public class ImportFromJson {
474
477
  }
475
478
  Object item = rowIndex.get(i);
476
479
  if (item instanceof String) {
477
- formattedRow.append('"').append(item).append('"');
480
+ String val = (String) item;
481
+ String rVal = val;
482
+ if(val.contains("'")) {
483
+ rVal = val.replace("'","''");
484
+ }
485
+ formattedRow.append("'").append(rVal).append("'");
478
486
  } else {
479
487
  formattedRow.append(item);
480
488
  }
@@ -482,7 +490,11 @@ public class ImportFromJson {
482
490
  insertValues.append("(").append(formattedRow).append("), ");
483
491
  }
484
492
  } else if ((int) rowIndex.get(colIndex) == 1) {
485
- deletedIds.append(rowIndex.get(0)).append(", ");
493
+ if (rowIndex.get(0) instanceof String) {
494
+ deletedIds.append("'").append(rowIndex.get(0)).append("', ");
495
+ } else {
496
+ deletedIds.append(rowIndex.get(0)).append(", ");
497
+ }
486
498
  }
487
499
  }
488
500
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor-community/sqlite",
3
- "version": "5.5.0",
3
+ "version": "5.5.1-2",
4
4
  "description": "Community plugin for native & electron SQLite databases",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -59,11 +59,11 @@
59
59
  "prepublishOnly": "npm run build && npm run build-electron && npm run docgen"
60
60
  },
61
61
  "devDependencies": {
62
- "@capacitor/android": "^5.5.0",
63
- "@capacitor/cli": "^5.5.0",
64
- "@capacitor/core": "^5.5.0",
62
+ "@capacitor/android": "^5.5.1",
63
+ "@capacitor/cli": "^5.5.1",
64
+ "@capacitor/core": "^5.5.1",
65
65
  "@capacitor/docgen": "^0.0.17",
66
- "@capacitor/ios": "^5.5.0",
66
+ "@capacitor/ios": "^5.5.1",
67
67
  "@ionic/eslint-config": "^0.3.0",
68
68
  "@ionic/prettier-config": "^1.0.1",
69
69
  "@ionic/swiftlint-config": "^1.1.2",
@@ -97,6 +97,6 @@
97
97
  }
98
98
  },
99
99
  "dependencies": {
100
- "jeep-sqlite": "^2.5.4"
100
+ "jeep-sqlite": "^2.5.5"
101
101
  }
102
102
  }