-
Notifications
You must be signed in to change notification settings - Fork 182
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
WhereArgs in Query.Builder has no love for booleans #684
Comments
Hi, @ZakTaccardi |
Hm, I think it's a good idea for Query, but not sure about RawQuery. What On 28 Sep 2016 2:46 pm, "Dmitrii Nikitin" notifications@github.com wrote:
|
What is the difference between |
Well, I mean, @nikitin-da not sure I got what you said about resolvers :) cc @thevery /others |
I mean, if user will decided to make resolver like this: new DefaultPutResolver<Tweet>() {
@Override
protected ContentValues mapToContentValues(Tweet tweet) {
ContentValues cv = new ContentValues();
cv.put("read", tweet.wasRead() ? 1 : -1);
return contentValues;
}
} And after then will put |
Ah, I see. Yeah, @ZakTaccardi SQLite is kind of "interesting" regarding type-safety :) Basically, the type of the column you use in |
whereArgs doesn't like booleans (at least if provided from Kotlin).
had to create an extension function to convert true -> int (1) or false -> int (0)
Obviously this occurs because SQLite does not have a concept of booleans, and we use integers for this instead.
The text was updated successfully, but these errors were encountered: