-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor for CursorAdapter? #155
Comments
I answered my own question about this yesterday in #154
|
I saw your workaround. I'm writing a couple of thoughts about it below. You're writing the query yourself, it's not a good practice. Even if you don't mind doing so, there should be a .getSQL() or something so that we can use the query builder instead. Additionally, I've seen that internally Sugar uses cursors, it just doesn't provide a method to get a reference of it. Using SQLiteDatabase directly kind of break the abstraction layer. It's not entirely bad, but I added Sugar to this project in which I'm working so I didn't have to do that! I just realized there is no way to inflate a SugarRecord given a cursor, or I couldn't find such a method. There is one .inflate() in SugarRecord but it's defined as private. |
Are there any updates on this? |
This has been requested a few times. I'll get it into 1.4.0! If someone can put up a pull request I'd be happy to merge it in |
@whoshuu see PR 312 |
Is there a way to get a cursor from queries such as the following ones?
I don't want to get a list of all matching items since I expect to have quite a lot of them. I want a cursor instead to use in a CursorAdapter to fill a ListView.
What's the way to go here?
The text was updated successfully, but these errors were encountered: