Challenge: Queries | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/11736883-saving-data-on-android/lessons/20

Cannot find QUERY_BY_ID anywhere, not even in the final folder

Hey @ooono!

I’m not sure which projects you’re using, but in the starter project for this episode, there’s a QUERY_BY_ID constant declared in the DatabaseConstants file.

Can you please check again?

Thanks!

Hi there! I’m seeing the same as ooono. I’ve downloaded the starter project for this episode “Set up the Database”, everything has been fine so far, but QUERY_BY_ID is not predefined in DatabaseContstants in either the start folder or the final folder. In fact, the source in the final folder just has stubbed out “TODO” functions in TrippeyDatabase.kt.

For anyone coming after me, you can just drop this in your DatabaseConstants.kt file:

  const val QUERY_BY_ID = """
    $COLUMN_ID = ?
  """