Skip to content

Commit

Permalink
fix issue#492 Android
Browse files Browse the repository at this point in the history
  • Loading branch information
jepiqueau committed Dec 15, 2023
1 parent a0cf6da commit 8bdcc5e
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 24 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 5.5.1-1 (2023-12-15)

### Chore

- Update to @capacitor/core@5.5.1
- Update to @capacitor/ios@5.5.1
- Update to @capacitor/android@5.5.1

### Bug Fixes

- Fix importFromJson on android fails to build SQL Statement with ' in values. issue#492

# 5.5.0 (2023-12-13)

### Chore
Expand Down
Binary file modified android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,12 @@ private JSONObject generateInsertAndDeletedStrings(ArrayList<String> tColNames,
String formattedRow = null;
formattedRow = String.join(", ", rowIndex.stream().map(item -> {
if (item instanceof String) {
StringBuilder formattedValue = new StringBuilder();
formattedValue.append('"').append(item).append('"');
return formattedValue.toString();
String val = (String) item;
String rVal = val;
if(val.contains("'")) {
rVal = val.replace("'","''");
}
return "'" + rVal + "'";
} else {
return item.toString();
}
Expand All @@ -474,7 +477,12 @@ private JSONObject generateInsertAndDeletedStrings(ArrayList<String> tColNames,
}
Object item = rowIndex.get(i);
if (item instanceof String) {
formattedRow.append('"').append(item).append('"');
String val = (String) item;
String rVal = val;
if(val.contains("'")) {
rVal = val.replace("'","''");
}
formattedRow.append("'").append(rVal).append("'");
} else {
formattedRow.append(item);
}
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
"prepublishOnly": "npm run build && npm run build-electron && npm run docgen"
},
"devDependencies": {
"@capacitor/android": "^5.5.0",
"@capacitor/cli": "^5.5.0",
"@capacitor/core": "^5.5.0",
"@capacitor/android": "^5.5.1",
"@capacitor/cli": "^5.5.1",
"@capacitor/core": "^5.5.1",
"@capacitor/docgen": "^0.0.17",
"@capacitor/ios": "^5.5.0",
"@capacitor/ios": "^5.5.1",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
Expand Down

0 comments on commit 8bdcc5e

Please sign in to comment.