Hello, I'm java desktop developer and want to deal with database encryptions.
So I found Couchbase-lite-Java version 1.3.1 and try to make it to work in my sqlite project.
(The project for trying to encrypt local database of my desktop application in Java.)
Also I'd like to try this with internal apis of com.couchbase.lite.internal.
But I stocked for an issue like below..
Database file was created successfully with below codes but the table what I want to create is not generated.
Is there an options that I missed?
Please check below..
com.couchbase.lite.internal.database.sqlite.exception.SQLiteException: no such table: CLIENTS (code 1): , while compiling: SELECT * FROM CLIENTS
SQLiteDatabase.setDatabasePlatformSupport(new DatabasePlatformSupport() {
@Override
public boolean isMainThread() {
return false;
}
});
database = SQLiteDatabase.openDatabase(
System.getProperty("user.dir") + "/" + dbName, null,
SQLiteDatabase.CREATE_IF_NECESSARY |SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING | SQLiteDatabase.OPEN_READWRITE,
4, null, this);
// try to create some table
database.execSQL("CREATE TABLE IF NOT EXISTS CLIENTS ( SomeValue INTEGER PRIMARY KEY, OtherValue INTEGER NOT NULL)"); // no exceptions.// try to select some clients
database.rawQuery("SELECT * FROM CLIENTS", null); // no such table exception.