Reputation: 1028
I write an Android app and asking myself to handle database access. According the Android API the managedQuery as well as startManagingCursor method of class Activity will be deprecated soon and it is recommended to use the CurserLoader instead. As far as I know CurserLoader must be backed by a ContentProvider. Does it now mean that using a ContentProvider is the only clean way to provide access to the database even when you don’t want to share data with other apps? And if so how you would provide join tables, it’s really necessary to write a ContentProvider for each one or to put everything in one? How you realize associations? I don’t wan’t have ContentProvider classes consisting of several thousand lines of code.
Thank you for all answers.
Upvotes: 0
Views: 240
Reputation: 27659
There are other ways as @Alex told. I will give you an example of how to use them?
You can use for example rawQuery.
String query="select * from myTable where myColumn > 1";
Cursor objCursor = objSQLiteDatabase.rawQuery(query, null);
Upvotes: 1