Skip to content

Instantly share code, notes, and snippets.

@freaksgit
Created July 30, 2018 09:23
Show Gist options
  • Save freaksgit/839a6060eb529739d0a550d1e6554fbe to your computer and use it in GitHub Desktop.
Save freaksgit/839a6060eb529739d0a550d1e6554fbe to your computer and use it in GitHub Desktop.
@Query("SELECT * FROM " + RoomCard.TABLE_NAME + " WHERE " + RoomCard.COLUMN_TYPE + " = " + Card.TYPE_QUEST)
Maybe<List<RoomQuestCardEmbedded>> getAllQuestCards();
public class RoomCard {
public static final String COLUMN_TYPE = "card_type";
...
}
public class Card{
public static final String TYPE_QUEST = "quest";
...
}
error: There is a problem with the query: [SQLITE_ERROR] SQL error or missing database (no such column: quest)
Maybe<List<RoomQuestCardEmbedded>> getAllQuestCards();
@freaksgit
Copy link
Author

freaksgit commented Jul 30, 2018

SOLVED:
...RoomCard.COLUMN_TYPE + " = \'" + Card.TYPE_QUEST + "\'")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment