@unvired/cordova-plugin-unvired-electron-db 0.0.44 → 0.0.46

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unvired/cordova-plugin-unvired-electron-db",
3
3
  "displayName": "Unvired DB",
4
- "version": "0.0.44",
4
+ "version": "0.0.46",
5
5
  "description": "Unvired DB Native Support for Cordova",
6
6
  "scripts": {},
7
7
  "keywords": [
package/plugin.xml CHANGED
@@ -1,7 +1,7 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
2
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
3
3
  id="@unvired/cordova-plugin-unvired-electron-db"
4
- version="0.0.44"
4
+ version="0.0.46"
5
5
  xmlns:android="http://schemas.android.com/apk/res/android">
6
6
  <name>Unvired DB</name>
7
7
  <description>Unvired DB Native Support for Cordova</description>
@@ -54,8 +54,8 @@
54
54
 
55
55
  <!-- AndroidX dependencies -->
56
56
  <framework src="androidx.core:core:1.9.0"/>
57
- <framework src="androidx.sqlite:sqlite:2.3.1"/>
58
- <framework src='net.zetetic:android-database-sqlcipher:4.5.3@aar'/>
57
+ <framework src="androidx.sqlite:sqlite:2.6.2"/>
58
+ <framework src="net.zetetic:sqlcipher-android:4.15.0@aar"/>
59
59
  </platform>
60
60
  <platform name="browser">
61
61
  <config-file target="config.xml" parent="/*">
@@ -1,7 +1,7 @@
1
1
  package com.unvired.dbplugin;
2
2
 
3
3
  import android.content.Context;
4
- import net.sqlcipher.database.SQLiteDatabase;
4
+ import net.zetetic.database.sqlcipher.SQLiteDatabase;
5
5
  import android.database.sqlite.SQLiteException;
6
6
  import android.util.Log;
7
7
 
@@ -77,12 +77,12 @@ public class DBPlugin extends CordovaPlugin {
77
77
  }
78
78
 
79
79
  try {
80
- SQLiteDatabase.loadLibs(cordova.getActivity().getApplicationContext());
80
+ System.loadLibrary("sqlcipher");
81
81
 
82
82
 
83
83
  // Create framework database// Create framework database
84
84
  fwDbPath = userPath + "/framework.db";
85
- fwDb = SQLiteDatabase.openOrCreateDatabase(fwDbPath, "", null);
85
+ fwDb = SQLiteDatabase.openOrCreateDatabase(fwDbPath, "", null, null, null);
86
86
 
87
87
  // Enable WAL
88
88
  fwDb.enableWriteAheadLogging();
@@ -94,7 +94,7 @@ public class DBPlugin extends CordovaPlugin {
94
94
 
95
95
  // Create app database
96
96
  appDbPath = userPath + "/app.db";
97
- appDb = SQLiteDatabase.openOrCreateDatabase(appDbPath, "", null);
97
+ appDb = SQLiteDatabase.openOrCreateDatabase(appDbPath, "", null, null, null);
98
98
 
99
99
  // Enable WAL
100
100
  appDb.enableWriteAheadLogging();
@@ -146,12 +146,12 @@ public class DBPlugin extends CordovaPlugin {
146
146
  }
147
147
 
148
148
  try {
149
- String[] selectionArgs = null;
149
+ Object[] selectionArgs = null;
150
150
  if (queryArgs != null && queryArgs.length() > 0) {
151
- selectionArgs = new String[queryArgs.length()];
151
+ selectionArgs = new Object[queryArgs.length()];
152
152
  for (int i = 0; i < queryArgs.length(); i++) {
153
153
  Object val = queryArgs.get(i);
154
- selectionArgs[i] = (val == null || val == JSONObject.NULL) ? null : String.valueOf(val);
154
+ selectionArgs[i] = (val == null || val == JSONObject.NULL) ? null : val;
155
155
  }
156
156
  }
157
157
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-unvired-electron-db",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "description": "Unvired DB Native Support for Cordova",
5
5
  "main": "unvired-db-proxy.js",
6
6
  "author": "Unvired Inc",