Skip to content
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

Cast Example #1729

Open
apsoftware-andyp opened this issue Nov 16, 2021 · 0 comments
Open

Cast Example #1729

apsoftware-andyp opened this issue Nov 16, 2021 · 0 comments

Comments

@apsoftware-andyp
Copy link

ISSUE_TEMPLATE

DBFlow Version: 3.1.1

Bug or Feature Request:

Description:
I have a fairly complex query I'm trying to port to DBFlow semantics. The biggest hurdle I've had is trying to figure out the syntax for a query piece that looks essentially like this:

SELECT Message.X, Message.Y, Message.Z, CASE WHEN CAST(Conversation.Bookmark AS LONG) <= 0 THEN false ELSE true END isBookmarkAvailable

I can get part way there with the syntax
IProperty foo = Method.cast(Conversation_Table.Bookmark).as(SQLiteType.INTEGER); but I cannot do a comparison "<= 0" on the IProperty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant