@capacitor-community/sqlite 5.5.1-3 → 5.5.1-4
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/android/src/main/java/com/getcapacitor/community/database/sqlite/CapacitorSQLite.java
CHANGED
|
@@ -799,8 +799,10 @@ public class CapacitorSQLite {
|
|
|
799
799
|
String[] listFiles = uFile.getListOfFiles(context);
|
|
800
800
|
JSArray retArray = new JSArray();
|
|
801
801
|
for (String file : listFiles) {
|
|
802
|
-
|
|
803
|
-
|
|
802
|
+
if (file.contains("SQLite")) {
|
|
803
|
+
retArray.put(file);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
804
806
|
if (retArray.length() > 0) {
|
|
805
807
|
return retArray;
|
|
806
808
|
} else {
|
|
@@ -819,7 +821,9 @@ public class CapacitorSQLite {
|
|
|
819
821
|
String[] listFiles = uMigrate.getMigratableList(context, folderPath);
|
|
820
822
|
JSArray retArray = new JSArray();
|
|
821
823
|
for (String file : listFiles) {
|
|
822
|
-
|
|
824
|
+
if (!file.contains("SQLite")) {
|
|
825
|
+
retArray.put(file);
|
|
826
|
+
}
|
|
823
827
|
}
|
|
824
828
|
if (retArray.length() > 0) {
|
|
825
829
|
return retArray;
|
|
@@ -1547,7 +1547,10 @@ enum CapacitorSQLiteError: Error {
|
|
|
1547
1547
|
let aPath: String = try (UtilsFile.getFolderURL(folderPath: databaseLocation)).path
|
|
1548
1548
|
// get the database files
|
|
1549
1549
|
let dbList: [String] = try UtilsFile.getFileList(path: aPath, ext: ".db")
|
|
1550
|
-
|
|
1550
|
+
// filter for db including SQLite
|
|
1551
|
+
let dbWithSQLite = dbList.filter { $0.contains("SQLite") }
|
|
1552
|
+
|
|
1553
|
+
return dbWithSQLite
|
|
1551
1554
|
|
|
1552
1555
|
} catch let error {
|
|
1553
1556
|
let msg: String = "\(error)"
|
|
@@ -1564,7 +1567,10 @@ enum CapacitorSQLiteError: Error {
|
|
|
1564
1567
|
do {
|
|
1565
1568
|
let dbList: [String] = try UtilsMigrate
|
|
1566
1569
|
.getMigratableList(folderPath: folderPath)
|
|
1567
|
-
|
|
1570
|
+
// filter for db not including SQLite
|
|
1571
|
+
let dbNoSQLite = dbList.filter { !$0.contains("SQLite") }
|
|
1572
|
+
|
|
1573
|
+
return dbNoSQLite
|
|
1568
1574
|
|
|
1569
1575
|
} catch UtilsMigrateError.getMigratableList(let message) {
|
|
1570
1576
|
var msg: String = "getMigratableList:"
|