Database 3rd param on java

This commit is contained in:
Diego Mello 2023-04-04 13:23:44 -03:00
parent 3f96d28a90
commit 9dab0fcecc
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package chat.rocket.reactnative;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Base64;
import android.util.Log;
@ -80,7 +81,8 @@ class Encryption {
dbName += "-experimental";
}
dbName += ".db";
Database database = new Database(dbName, reactContext);
// TODO: it shouldn't be needed, but let's add it for now
Database database = new Database(dbName, reactContext, SQLiteDatabase.CREATE_IF_NECESSARY);
String[] query = {ejson.rid};
Cursor cursor = database.rawQuery("select * from subscriptions where id == ? limit 1", query);