sqlite-android icon indicating copy to clipboard operation
sqlite-android copied to clipboard

How do I override the cursor factory?

Open vinaysshenoy opened this issue 5 years ago • 2 comments

The RequerySQLiteOpenHelperFactory does not seem to have an option for me to provide my own cursor factory. Is there a recommended way to do this? So far, it seems like I would have to make a copy of io.requery.android.database.sqlite.SQLiteOpenHelper and modify it to create an instance of io.requery.android.database.sqlite.SQLiteDatabase with my custom cursor factory. I'd rather not do that if there was a way for me to override it manually.

What I am specifically looking to do is create cursors with larger windows, so if there is a way for me to do that without needing to override the cursot factory, that would be great as well.

vinaysshenoy avatar Dec 03 '20 10:12 vinaysshenoy

Does SQLiteDatabase.queryWithFactory not work for your use case ?

npurushe avatar Jan 20 '21 08:01 npurushe

We currently use the Android Room database library which generates code from interfaces. We don't use the SQLiteDatabase classes directly in the codebase.

vinaysshenoy avatar Jan 20 '21 09:01 vinaysshenoy