@capgo/capacitor-data-storage-sqlite 6.0.59 → 7.1.0

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.
Files changed (52) hide show
  1. package/CapgoCapacitorDataStorageSqlite.podspec +2 -2
  2. package/Package.swift +30 -0
  3. package/README.md +724 -0
  4. package/android/build.gradle +11 -11
  5. package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/CapgoCapacitorDataStorageSqlite.java +290 -320
  6. package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/CapgoCapacitorDataStorageSqlitePlugin.java +373 -388
  7. package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/RetHandler.java +97 -97
  8. package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/Data.java +3 -3
  9. package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/Global.java +2 -2
  10. package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/ImportExportJson/JsonStore.java +108 -110
  11. package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/ImportExportJson/JsonTable.java +78 -80
  12. package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/ImportExportJson/JsonValue.java +62 -64
  13. package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/StorageDatabaseHelper.java +557 -624
  14. package/android/src/main/java/com/jeep/plugin/capacitor/capgocapacitordatastoragesqlite/cdssUtils/UtilsSQLCipher.java +103 -144
  15. package/dist/docs.json +0 -64
  16. package/dist/esm/definitions.d.ts +0 -19
  17. package/dist/esm/definitions.js.map +1 -1
  18. package/dist/esm/index.d.ts +2 -2
  19. package/dist/esm/index.js +5 -6
  20. package/dist/esm/index.js.map +1 -1
  21. package/dist/esm/web-utils/StorageDatabaseHelper.d.ts +2 -2
  22. package/dist/esm/web-utils/StorageDatabaseHelper.js +8 -8
  23. package/dist/esm/web-utils/StorageDatabaseHelper.js.map +1 -1
  24. package/dist/esm/web-utils/json-utils.js +15 -18
  25. package/dist/esm/web-utils/json-utils.js.map +1 -1
  26. package/dist/esm/web.d.ts +2 -3
  27. package/dist/esm/web.js +37 -44
  28. package/dist/esm/web.js.map +1 -1
  29. package/dist/plugin.cjs.js +56 -67
  30. package/dist/plugin.cjs.js.map +1 -1
  31. package/dist/plugin.js +56 -67
  32. package/dist/plugin.js.map +1 -1
  33. package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/CapgoCapacitorDataStorageSqlitePlugin.swift +27 -10
  34. package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/StorageDatabaseHelper.swift +1 -1
  35. package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Utils/UtilsFile.swift +1 -1
  36. package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Utils/UtilsSQLCipher.swift +3 -3
  37. package/ios/Tests/CapgoCapacitorDataStorageSqlitePluginTests/CapacitorDataStorageSqlitePluginTests.swift +13 -0
  38. package/package.json +34 -38
  39. package/electron/dist/plugin.js +0 -1044
  40. package/electron/dist/plugin.js.map +0 -1
  41. package/ios/Plugin/CapgoCapacitorDataStorageSqlitePlugin.h +0 -10
  42. package/ios/Plugin/CapgoCapacitorDataStorageSqlitePlugin.m +0 -29
  43. package/ios/Plugin/Info.plist +0 -24
  44. package/readme.md +0 -210
  45. /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/CapgoCapacitorDataStorageSqlite.swift +0 -0
  46. /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Data.swift +0 -0
  47. /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Global.swift +0 -0
  48. /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/ImportExportJson/JsonStore.swift +0 -0
  49. /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/ReturnHandler.swift +0 -0
  50. /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Utils/Blob.swift +0 -0
  51. /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Utils/UtilsBinding.swift +0 -0
  52. /package/ios/{Plugin → Sources/CapgoCapacitorDataStorageSqlitePlugin}/Utils/UtilsEncryption.swift +0 -0
@@ -11,79 +11,77 @@ import org.json.JSONObject;
11
11
 
12
12
  public class JsonValue {
13
13
 
14
- private static final String TAG = "JsonValue";
15
- private static final List<String> keySchemaLevel = new ArrayList<String>(
16
- Arrays.asList("key", "value")
17
- );
18
- private String key = null;
19
- private String value = null;
14
+ private static final String TAG = "JsonValue";
15
+ private static final List<String> keySchemaLevel = new ArrayList<String>(Arrays.asList("key", "value"));
16
+ private String key = null;
17
+ private String value = null;
20
18
 
21
- // Getter
22
- public String getKey() {
23
- return key;
24
- }
19
+ // Getter
20
+ public String getKey() {
21
+ return key;
22
+ }
25
23
 
26
- public String getValue() {
27
- return value;
28
- }
24
+ public String getValue() {
25
+ return value;
26
+ }
29
27
 
30
- // Setter
31
- public void setKey(String newKey) {
32
- this.key = newKey;
33
- }
28
+ // Setter
29
+ public void setKey(String newKey) {
30
+ this.key = newKey;
31
+ }
34
32
 
35
- public void setValue(String newValue) {
36
- this.value = newValue;
37
- }
33
+ public void setValue(String newValue) {
34
+ this.value = newValue;
35
+ }
38
36
 
39
- public ArrayList<String> getKeys() {
40
- ArrayList<String> retArray = new ArrayList<String>();
41
- if (getKey() != null && getKey().length() > 0) retArray.add("key");
42
- if (getValue() != null && getValue().length() > 0) retArray.add("value");
43
- return retArray;
44
- }
37
+ public ArrayList<String> getKeys() {
38
+ ArrayList<String> retArray = new ArrayList<String>();
39
+ if (getKey() != null && getKey().length() > 0) retArray.add("key");
40
+ if (getValue() != null && getValue().length() > 0) retArray.add("value");
41
+ return retArray;
42
+ }
45
43
 
46
- public boolean isValue(JSONObject jsObj) {
47
- if (jsObj == null || jsObj.length() == 0) return false;
48
- Iterator<String> keys = jsObj.keys();
49
- while (keys.hasNext()) {
50
- String key = keys.next();
51
- if (!keySchemaLevel.contains(key)) return false;
52
- try {
53
- Object val = jsObj.get(key);
44
+ public boolean isValue(JSONObject jsObj) {
45
+ if (jsObj == null || jsObj.length() == 0) return false;
46
+ Iterator<String> keys = jsObj.keys();
47
+ while (keys.hasNext()) {
48
+ String key = keys.next();
49
+ if (!keySchemaLevel.contains(key)) return false;
50
+ try {
51
+ Object val = jsObj.get(key);
54
52
 
55
- if (key.equals("key")) {
56
- if (!(val instanceof String)) {
57
- return false;
58
- } else {
59
- key = (String) val;
60
- }
61
- }
62
- if (key.equals("value")) {
63
- if (!(val instanceof String)) {
64
- return false;
65
- } else {
66
- value = (String) val;
67
- }
53
+ if (key.equals("key")) {
54
+ if (!(val instanceof String)) {
55
+ return false;
56
+ } else {
57
+ key = (String) val;
58
+ }
59
+ }
60
+ if (key.equals("value")) {
61
+ if (!(val instanceof String)) {
62
+ return false;
63
+ } else {
64
+ value = (String) val;
65
+ }
66
+ }
67
+ } catch (JSONException e) {
68
+ e.printStackTrace();
69
+ return false;
70
+ }
68
71
  }
69
- } catch (JSONException e) {
70
- e.printStackTrace();
71
- return false;
72
- }
72
+ return true;
73
73
  }
74
- return true;
75
- }
76
74
 
77
- public void print() {
78
- String row = "";
79
- if (this.getKey() != null) row = "key: " + this.getKey();
80
- Log.d(TAG, row + " value: " + this.getValue());
81
- }
75
+ public void print() {
76
+ String row = "";
77
+ if (this.getKey() != null) row = "key: " + this.getKey();
78
+ Log.d(TAG, row + " value: " + this.getValue());
79
+ }
82
80
 
83
- public JSObject getValueAsJSObject() {
84
- JSObject retObj = new JSObject();
85
- if (this.key != null) retObj.put("key", this.key);
86
- retObj.put("value", this.value);
87
- return retObj;
88
- }
81
+ public JSObject getValueAsJSObject() {
82
+ JSObject retObj = new JSObject();
83
+ if (this.key != null) retObj.put("key", this.key);
84
+ retObj.put("value", this.value);
85
+ return retObj;
86
+ }
89
87
  }