@capacitor-community/sqlite 5.7.3-1 → 5.7.3-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-
|
|
21
|
+
<a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-43-orange?style=flat-square" /></a>
|
|
22
22
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
23
23
|
</p>
|
|
24
24
|
|
|
@@ -357,7 +357,7 @@ npm install --save-dev electron-builder@24.6.4
|
|
|
357
357
|
|
|
358
358
|
The iOS and Android codes are using `SQLCipher` allowing for database encryption.
|
|
359
359
|
The iOS codes is using `ZIPFoundation` for unzipping assets files
|
|
360
|
-
The Electron code is using `better-sqlite3-multiple-ciphers` , `electron-json-storage and `node-fetch` from 5.0.4.
|
|
360
|
+
The Electron code is using `better-sqlite3-multiple-ciphers` , `electron-json-storage` and `node-fetch` from 5.0.4.
|
|
361
361
|
The Web code is using the Stencil component `jeep-sqlite` based on `sql.js`, `localforage`. and `jszip`
|
|
362
362
|
|
|
363
363
|
## Contributors ✨
|
|
@@ -410,6 +410,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
410
410
|
<a href="https://github.com/msfstef" title="msfstef"><img src="https://avatars.githubusercontent.com/u/12274098?v=4" width="50" height="50" /></a>
|
|
411
411
|
<a href="https://github.com/ChrisHSandN" title="
|
|
412
412
|
ChrisHSandN"><img src="https://avatars.githubusercontent.com/u/13466620?v=4" width="50" height="50" /></a>
|
|
413
|
+
<a href="https://github.com/lasher23" title="
|
|
414
|
+
lasher23"><img src="https://avatars.githubusercontent.com/u/24244618?v=4" width="50" height="50" /></a>
|
|
415
|
+
<a href="https://github.com/mirsella" title="
|
|
416
|
+
mirsella"><img src="https://avatars.githubusercontent.com/u/45905567?v=4" width="50" height="50" /></a>
|
|
413
417
|
</p>
|
|
414
418
|
|
|
415
419
|
|
package/android/src/main/java/com/getcapacitor/community/database/sqlite/SQLite/Database.java
CHANGED
|
@@ -12,6 +12,7 @@ import static com.getcapacitor.community.database.sqlite.SQLite.UtilsSQLStatemen
|
|
|
12
12
|
|
|
13
13
|
import android.content.Context;
|
|
14
14
|
import android.content.SharedPreferences;
|
|
15
|
+
import android.database.DatabaseUtils;
|
|
15
16
|
import android.os.Build;
|
|
16
17
|
import android.util.Log;
|
|
17
18
|
import androidx.sqlite.db.SimpleSQLiteQuery;
|
|
@@ -503,7 +504,7 @@ public class Database {
|
|
|
503
504
|
String elementValue = "";
|
|
504
505
|
|
|
505
506
|
if (innerElement instanceof String) {
|
|
506
|
-
elementValue =
|
|
507
|
+
elementValue = DatabaseUtils.sqlEscapeString((String) innerElement);
|
|
507
508
|
} else {
|
|
508
509
|
elementValue = String.valueOf(innerElement);
|
|
509
510
|
}
|
|
@@ -520,7 +521,6 @@ public class Database {
|
|
|
520
521
|
sqlBuilder.append(",");
|
|
521
522
|
}
|
|
522
523
|
}
|
|
523
|
-
sqlBuilder.append(";");
|
|
524
524
|
String questionMark = extractQuestionMarkValues(statement);
|
|
525
525
|
String finalSql = "";
|
|
526
526
|
if (questionMark != null) {
|
|
@@ -537,7 +537,7 @@ public class Database {
|
|
|
537
537
|
}
|
|
538
538
|
|
|
539
539
|
public String extractQuestionMarkValues(String input) {
|
|
540
|
-
Pattern pattern = Pattern.compile("VALUES \\((\\?(?:,\\s*\\?\\s*)*)\\)");
|
|
540
|
+
Pattern pattern = Pattern.compile("(?i)VALUES \\((\\?(?:,\\s*\\?\\s*)*)\\)");
|
|
541
541
|
Matcher matcher = pattern.matcher(input);
|
|
542
542
|
|
|
543
543
|
if (matcher.find()) {
|