SQLite OS layer abstraction?

Some people want to port my open source Android software to Blackberry and PC (also using SQLite).

I have separated the user interface code from the domain / database code. But the following problem: the domain / database code contains an import similar to this:

import android.database.Cursor;

... which makes it unbearable.

I think many other developers have the same problem, so the SQLite SQL abstraction layer must exist somewhere. What would you suggest?

Note. I use SQLite-specific functions, so the ORM or database abstraction level will not execute.

+3
source share
1 answer

I am currently developing an ORM project, especially for Android.

https://github.com/ahmetalpbalkan/orman

SQLite- ?

, , android.jar, the_jar_for_blackberry.jar, -

Database db = null;    
if (environment is android){
    db = new AndroidSQLiteDatabaseImpl();
} else {
    db = new MyBlackberrySQLiteImpl();
}

, .

import android.database.Cursor

AndroidSQLiteDatabaseImpl.java, , .

. android.jar, , jar, MySQL SQLite. AndroidSQLiteDtabase, .

+3

All Articles