@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
@@ -7,111 +7,111 @@ import com.getcapacitor.PluginCall;
7
7
 
8
8
  public class RetHandler {
9
9
 
10
- private static final String TAG = RetHandler.class.getName();
10
+ private static final String TAG = RetHandler.class.getName();
11
11
 
12
- /**
13
- * RetResult Method
14
- * Create and return the capSQLiteResult object
15
- *
16
- * @param call
17
- * @param res
18
- * @param message
19
- */
20
- public void retResult(PluginCall call, Boolean res, String message) {
21
- JSObject ret = new JSObject();
22
- if (message != null) {
23
- ret.put("message", message);
24
- Log.v(TAG, "*** ERROR " + message);
25
- call.reject(message);
26
- return;
12
+ /**
13
+ * RetResult Method
14
+ * Create and return the capSQLiteResult object
15
+ *
16
+ * @param call
17
+ * @param res
18
+ * @param message
19
+ */
20
+ public void retResult(PluginCall call, Boolean res, String message) {
21
+ JSObject ret = new JSObject();
22
+ if (message != null) {
23
+ ret.put("message", message);
24
+ Log.v(TAG, "*** ERROR " + message);
25
+ call.reject(message);
26
+ return;
27
+ }
28
+ if (res != null) {
29
+ ret.put("result", res);
30
+ call.resolve(ret);
31
+ return;
32
+ } else {
33
+ call.resolve();
34
+ return;
35
+ }
27
36
  }
28
- if (res != null) {
29
- ret.put("result", res);
30
- call.resolve(ret);
31
- return;
32
- } else {
33
- call.resolve();
34
- return;
35
- }
36
- }
37
37
 
38
- /**
39
- * RetValue Method
40
- * Create and return a value
41
- * @param call
42
- * @param res
43
- * @param message
44
- */
45
- public void retValue(PluginCall call, String res, String message) {
46
- JSObject ret = new JSObject();
47
- if (message != null) {
48
- ret.put("message", message);
49
- Log.v(TAG, "*** ERROR " + message);
50
- call.reject(message);
51
- return;
52
- } else {
53
- ret.put("value", res);
54
- call.resolve(ret);
55
- return;
38
+ /**
39
+ * RetValue Method
40
+ * Create and return a value
41
+ * @param call
42
+ * @param res
43
+ * @param message
44
+ */
45
+ public void retValue(PluginCall call, String res, String message) {
46
+ JSObject ret = new JSObject();
47
+ if (message != null) {
48
+ ret.put("message", message);
49
+ Log.v(TAG, "*** ERROR " + message);
50
+ call.reject(message);
51
+ return;
52
+ } else {
53
+ ret.put("value", res);
54
+ call.resolve(ret);
55
+ return;
56
+ }
56
57
  }
57
- }
58
58
 
59
- /**
60
- * RetJSObject Method
61
- * Create and return the capSQLiteJson object
62
- * @param call
63
- * @param res
64
- * @param message
65
- */
66
- public void retJSObject(PluginCall call, JSObject res, String message) {
67
- if (message != null) {
68
- call.reject(message);
69
- return;
70
- } else {
71
- call.resolve(res);
72
- return;
59
+ /**
60
+ * RetJSObject Method
61
+ * Create and return the capSQLiteJson object
62
+ * @param call
63
+ * @param res
64
+ * @param message
65
+ */
66
+ public void retJSObject(PluginCall call, JSObject res, String message) {
67
+ if (message != null) {
68
+ call.reject(message);
69
+ return;
70
+ } else {
71
+ call.resolve(res);
72
+ return;
73
+ }
73
74
  }
74
- }
75
75
 
76
- /**
77
- * RetChanges Method
78
- * Create and return the capSQLiteChanges object
79
- * @param call
80
- * @param res
81
- * @param message
82
- */
83
- public void retChanges(PluginCall call, JSObject res, String message) {
84
- JSObject ret = new JSObject();
85
- if (message != null) {
86
- ret.put("message", message);
87
- Log.v(TAG, "*** ERROR " + message);
88
- call.reject(message);
89
- return;
90
- } else {
91
- ret.put("changes", res);
92
- call.resolve(ret);
93
- return;
76
+ /**
77
+ * RetChanges Method
78
+ * Create and return the capSQLiteChanges object
79
+ * @param call
80
+ * @param res
81
+ * @param message
82
+ */
83
+ public void retChanges(PluginCall call, JSObject res, String message) {
84
+ JSObject ret = new JSObject();
85
+ if (message != null) {
86
+ ret.put("message", message);
87
+ Log.v(TAG, "*** ERROR " + message);
88
+ call.reject(message);
89
+ return;
90
+ } else {
91
+ ret.put("changes", res);
92
+ call.resolve(ret);
93
+ return;
94
+ }
94
95
  }
95
- }
96
96
 
97
- /**
98
- * RetJSObject Method
99
- * Create and return the capSQLiteJson object
100
- * @param call
101
- * @param res
102
- * @param message
103
- */
104
- public void retJsonObject(PluginCall call, JSObject res, String message) {
105
- JSObject ret = new JSObject();
106
- if (message != null) {
107
- ret.put("message", message);
108
- Log.v(TAG, "*** ERROR " + message);
109
- call.reject(message);
110
- return;
111
- } else {
112
- ret.put("export", res);
113
- call.resolve(ret);
114
- return;
97
+ /**
98
+ * RetJSObject Method
99
+ * Create and return the capSQLiteJson object
100
+ * @param call
101
+ * @param res
102
+ * @param message
103
+ */
104
+ public void retJsonObject(PluginCall call, JSObject res, String message) {
105
+ JSObject ret = new JSObject();
106
+ if (message != null) {
107
+ ret.put("message", message);
108
+ Log.v(TAG, "*** ERROR " + message);
109
+ call.reject(message);
110
+ return;
111
+ } else {
112
+ ret.put("export", res);
113
+ call.resolve(ret);
114
+ return;
115
+ }
115
116
  }
116
- }
117
117
  }
@@ -2,7 +2,7 @@ package com.jeep.plugin.capacitor.capgocapacitordatastoragesqlite.cdssUtils;
2
2
 
3
3
  public class Data {
4
4
 
5
- public Long id;
6
- public String name;
7
- public String value;
5
+ public Long id;
6
+ public String name;
7
+ public String value;
8
8
  }
@@ -2,6 +2,6 @@ package com.jeep.plugin.capacitor.capgocapacitordatastoragesqlite.cdssUtils;
2
2
 
3
3
  public class Global {
4
4
 
5
- public String secret = "test secret";
6
- public String newsecret = "test new secret";
5
+ public String secret = "test secret";
6
+ public String newsecret = "test new secret";
7
7
  }
@@ -12,120 +12,118 @@ import org.json.JSONException;
12
12
 
13
13
  public class JsonStore {
14
14
 
15
- private static final String TAG = "JsonStore";
16
-
17
- private String database = "";
18
- private Boolean encrypted = null;
19
- private ArrayList<JsonTable> tables = new ArrayList<JsonTable>();
20
-
21
- private static final List<String> keyFirstLevel = new ArrayList<String>(
22
- Arrays.asList("database", "encrypted", "tables")
23
- );
24
-
25
- // Getter
26
- public String getDatabase() {
27
- return database;
28
- }
29
-
30
- public Boolean getEncrypted() {
31
- return encrypted;
32
- }
33
-
34
- public ArrayList<JsonTable> getTables() {
35
- return tables;
36
- }
37
-
38
- // Setter
39
- public void setDatabase(String newDatabase) {
40
- this.database = newDatabase;
41
- }
42
-
43
- public void setEncrypted(Boolean newEncrypted) {
44
- this.encrypted = newEncrypted;
45
- }
46
-
47
- public void setTables(ArrayList<JsonTable> newTables) {
48
- this.tables = newTables;
49
- }
50
-
51
- public ArrayList<String> getKeys() {
52
- ArrayList<String> retArray = new ArrayList<String>();
53
- if (getDatabase().length() > 0) retArray.add("database");
54
- if (getEncrypted() != null) retArray.add("encrypted");
55
- if (getTables().size() > 0) retArray.add("tables");
56
- return retArray;
57
- }
58
-
59
- public boolean isJsonStore(JSObject jsObj) {
60
- if (jsObj == null || jsObj.length() == 0) return false;
61
- Iterator<String> keys = jsObj.keys();
62
- while (keys.hasNext()) {
63
- String key = keys.next();
64
- if (!keyFirstLevel.contains(key)) return false;
65
- try {
66
- Object value = jsObj.get(key);
67
-
68
- if (key.equals("database")) {
69
- if (!(value instanceof String)) {
70
- return false;
71
- } else {
72
- database = (String) value;
73
- }
74
- }
75
- if (key.equals("encrypted")) {
76
- if (!(value instanceof Boolean)) {
77
- return false;
78
- } else {
79
- encrypted = jsObj.getBool(key);
80
- }
81
- }
82
- if (key.equals("tables")) {
83
- if (!(value instanceof JSONArray)) {
84
- String msg = "value: not instance of JSONArray 1";
85
- Log.d(TAG, msg);
86
-
87
- return false;
88
- } else {
89
- if (value instanceof JSONArray) {
90
- JSONArray arrJS = jsObj.getJSONArray(key);
91
- tables = new ArrayList<>();
92
-
93
- for (int i = 0; i < arrJS.length(); i++) {
94
- JsonTable table = new JsonTable();
95
- boolean retTable = table.isTable(arrJS.getJSONObject(i));
96
-
97
- if (!retTable) return false;
98
- tables.add(table);
99
- }
100
- } else {
101
- String msg = "value: not instance of ";
102
- msg += "JSONArray 2";
103
- Log.d(TAG, msg);
15
+ private static final String TAG = "JsonStore";
16
+
17
+ private String database = "";
18
+ private Boolean encrypted = null;
19
+ private ArrayList<JsonTable> tables = new ArrayList<JsonTable>();
20
+
21
+ private static final List<String> keyFirstLevel = new ArrayList<String>(Arrays.asList("database", "encrypted", "tables"));
22
+
23
+ // Getter
24
+ public String getDatabase() {
25
+ return database;
26
+ }
27
+
28
+ public Boolean getEncrypted() {
29
+ return encrypted;
30
+ }
31
+
32
+ public ArrayList<JsonTable> getTables() {
33
+ return tables;
34
+ }
35
+
36
+ // Setter
37
+ public void setDatabase(String newDatabase) {
38
+ this.database = newDatabase;
39
+ }
40
+
41
+ public void setEncrypted(Boolean newEncrypted) {
42
+ this.encrypted = newEncrypted;
43
+ }
44
+
45
+ public void setTables(ArrayList<JsonTable> newTables) {
46
+ this.tables = newTables;
47
+ }
48
+
49
+ public ArrayList<String> getKeys() {
50
+ ArrayList<String> retArray = new ArrayList<String>();
51
+ if (getDatabase().length() > 0) retArray.add("database");
52
+ if (getEncrypted() != null) retArray.add("encrypted");
53
+ if (getTables().size() > 0) retArray.add("tables");
54
+ return retArray;
55
+ }
56
+
57
+ public boolean isJsonStore(JSObject jsObj) {
58
+ if (jsObj == null || jsObj.length() == 0) return false;
59
+ Iterator<String> keys = jsObj.keys();
60
+ while (keys.hasNext()) {
61
+ String key = keys.next();
62
+ if (!keyFirstLevel.contains(key)) return false;
63
+ try {
64
+ Object value = jsObj.get(key);
65
+
66
+ if (key.equals("database")) {
67
+ if (!(value instanceof String)) {
68
+ return false;
69
+ } else {
70
+ database = (String) value;
71
+ }
72
+ }
73
+ if (key.equals("encrypted")) {
74
+ if (!(value instanceof Boolean)) {
75
+ return false;
76
+ } else {
77
+ encrypted = jsObj.getBool(key);
78
+ }
79
+ }
80
+ if (key.equals("tables")) {
81
+ if (!(value instanceof JSONArray)) {
82
+ String msg = "value: not instance of JSONArray 1";
83
+ Log.d(TAG, msg);
84
+
85
+ return false;
86
+ } else {
87
+ if (value instanceof JSONArray) {
88
+ JSONArray arrJS = jsObj.getJSONArray(key);
89
+ tables = new ArrayList<>();
90
+
91
+ for (int i = 0; i < arrJS.length(); i++) {
92
+ JsonTable table = new JsonTable();
93
+ boolean retTable = table.isTable(arrJS.getJSONObject(i));
94
+
95
+ if (!retTable) return false;
96
+ tables.add(table);
97
+ }
98
+ } else {
99
+ String msg = "value: not instance of ";
100
+ msg += "JSONArray 2";
101
+ Log.d(TAG, msg);
102
+ }
103
+ }
104
+ }
105
+ } catch (JSONException e) {
106
+ e.printStackTrace();
107
+ return false;
104
108
  }
105
- }
106
109
  }
107
- } catch (JSONException e) {
108
- e.printStackTrace();
109
- return false;
110
- }
110
+ return true;
111
111
  }
112
- return true;
113
- }
114
-
115
- public void print() {
116
- Log.d(TAG, "database: " + this.getDatabase());
117
- Log.d(TAG, "encrypted: " + this.getEncrypted());
118
- Log.d(TAG, "number of Tables: " + this.getTables().size());
119
- for (JsonTable table : this.getTables()) {
120
- table.print();
112
+
113
+ public void print() {
114
+ Log.d(TAG, "database: " + this.getDatabase());
115
+ Log.d(TAG, "encrypted: " + this.getEncrypted());
116
+ Log.d(TAG, "number of Tables: " + this.getTables().size());
117
+ for (JsonTable table : this.getTables()) {
118
+ table.print();
119
+ }
121
120
  }
122
- }
123
121
 
124
- public JSArray getTablesAsJSObject() {
125
- JSArray JSTables = new JSArray();
126
- for (JsonTable table : this.tables) {
127
- JSTables.put(table.getTableAsJSObject());
122
+ public JSArray getTablesAsJSObject() {
123
+ JSArray JSTables = new JSArray();
124
+ for (JsonTable table : this.tables) {
125
+ JSTables.put(table.getTableAsJSObject());
126
+ }
127
+ return JSTables;
128
128
  }
129
- return JSTables;
130
- }
131
129
  }
@@ -12,99 +12,97 @@ import org.json.JSONObject;
12
12
 
13
13
  public class JsonTable {
14
14
 
15
- private static final String TAG = "JsonTable";
16
- private static final List<String> keyTableLevel = new ArrayList<String>(
17
- Arrays.asList("name", "values")
18
- );
15
+ private static final String TAG = "JsonTable";
16
+ private static final List<String> keyTableLevel = new ArrayList<String>(Arrays.asList("name", "values"));
19
17
 
20
- private String name = "";
21
- private ArrayList<JsonValue> values = new ArrayList<JsonValue>();
18
+ private String name = "";
19
+ private ArrayList<JsonValue> values = new ArrayList<JsonValue>();
22
20
 
23
- // Getter
24
- public String getName() {
25
- return name;
26
- }
21
+ // Getter
22
+ public String getName() {
23
+ return name;
24
+ }
27
25
 
28
- public ArrayList<JsonValue> getValues() {
29
- return values;
30
- }
26
+ public ArrayList<JsonValue> getValues() {
27
+ return values;
28
+ }
31
29
 
32
- // Setter
33
- public void setName(String newName) {
34
- this.name = newName;
35
- }
30
+ // Setter
31
+ public void setName(String newName) {
32
+ this.name = newName;
33
+ }
36
34
 
37
- public void setValues(ArrayList<JsonValue> newValues) {
38
- this.values = newValues;
39
- }
35
+ public void setValues(ArrayList<JsonValue> newValues) {
36
+ this.values = newValues;
37
+ }
40
38
 
41
- public ArrayList<String> getKeys() {
42
- ArrayList<String> retArray = new ArrayList<String>();
43
- if (getName().length() > 0) retArray.add("names");
44
- if (getValues().size() > 0) retArray.add("values");
45
- return retArray;
46
- }
39
+ public ArrayList<String> getKeys() {
40
+ ArrayList<String> retArray = new ArrayList<String>();
41
+ if (getName().length() > 0) retArray.add("names");
42
+ if (getValues().size() > 0) retArray.add("values");
43
+ return retArray;
44
+ }
47
45
 
48
- public boolean isTable(JSONObject jsObj) {
49
- if (jsObj == null || jsObj.length() == 0) return false;
50
- Iterator<String> keys = jsObj.keys();
51
- while (keys.hasNext()) {
52
- String key = keys.next();
53
- if (!keyTableLevel.contains(key)) return false;
54
- try {
55
- Object value = jsObj.get(key);
56
- if (key.equals("name")) {
57
- if (!(value instanceof String)) {
58
- return false;
59
- } else {
60
- name = (String) value;
61
- }
62
- }
63
- if (key.equals("values")) {
64
- if (!(value instanceof JSONArray) && !(value instanceof ArrayList)) {
65
- return false;
66
- } else {
67
- values = new ArrayList<JsonValue>();
68
- JSONArray arr = jsObj.getJSONArray(key);
69
- for (int i = 0; i < arr.length(); i++) {
70
- JSONObject row = arr.getJSONObject(i);
71
- JsonValue arrRow = new JsonValue();
72
- arrRow.setKey(row.getString("key"));
73
- arrRow.setValue(row.getString("value"));
74
- values.add(arrRow);
46
+ public boolean isTable(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 (!keyTableLevel.contains(key)) return false;
52
+ try {
53
+ Object value = jsObj.get(key);
54
+ if (key.equals("name")) {
55
+ if (!(value instanceof String)) {
56
+ return false;
57
+ } else {
58
+ name = (String) value;
59
+ }
60
+ }
61
+ if (key.equals("values")) {
62
+ if (!(value instanceof JSONArray) && !(value instanceof ArrayList)) {
63
+ return false;
64
+ } else {
65
+ values = new ArrayList<JsonValue>();
66
+ JSONArray arr = jsObj.getJSONArray(key);
67
+ for (int i = 0; i < arr.length(); i++) {
68
+ JSONObject row = arr.getJSONObject(i);
69
+ JsonValue arrRow = new JsonValue();
70
+ arrRow.setKey(row.getString("key"));
71
+ arrRow.setValue(row.getString("value"));
72
+ values.add(arrRow);
73
+ }
74
+ }
75
+ }
76
+ } catch (JSONException e) {
77
+ e.printStackTrace();
78
+ return false;
75
79
  }
76
- }
77
80
  }
78
- } catch (JSONException e) {
79
- e.printStackTrace();
80
- return false;
81
- }
81
+ return true;
82
82
  }
83
- return true;
84
- }
85
83
 
86
- public void print() {
87
- Log.d(TAG, "name: " + this.getName());
88
- Log.d(TAG, "number of Values: " + this.getValues().size());
89
- for (JsonValue row : this.getValues()) {
90
- Log.d(TAG, "row: " + row);
84
+ public void print() {
85
+ Log.d(TAG, "name: " + this.getName());
86
+ Log.d(TAG, "number of Values: " + this.getValues().size());
87
+ for (JsonValue row : this.getValues()) {
88
+ Log.d(TAG, "row: " + row);
89
+ }
91
90
  }
92
- }
93
91
 
94
- public JSObject getTableAsJSObject() {
95
- JSObject retObj = new JSObject();
96
- retObj.put("name", getName());
97
- JSONArray JSValues = new JSONArray();
98
- if (this.values.size() > 0) {
99
- if (this.values.size() > 0) {
100
- for (JsonValue jVal : this.values) {
101
- JSValues.put(jVal.getValueAsJSObject());
92
+ public JSObject getTableAsJSObject() {
93
+ JSObject retObj = new JSObject();
94
+ retObj.put("name", getName());
95
+ JSONArray JSValues = new JSONArray();
96
+ if (this.values.size() > 0) {
97
+ if (this.values.size() > 0) {
98
+ for (JsonValue jVal : this.values) {
99
+ JSValues.put(jVal.getValueAsJSObject());
100
+ }
101
+ retObj.put("values", JSValues);
102
+ }
103
+ retObj.put("values", JSValues);
102
104
  }
103
- retObj.put("values", JSValues);
104
- }
105
- retObj.put("values", JSValues);
106
- }
107
105
 
108
- return retObj;
109
- }
106
+ return retObj;
107
+ }
110
108
  }