google-developer-training / android-basics-kotlin-sql-basics-app

Fundamentals of relational databases and practice running SQL queries with Database Inspector in Android Studio.
Apache License 2.0
62 stars 127 forks source link

Use SQL to read and write to a database #65

Open AndreaBruno97 opened 1 month ago

AndreaBruno97 commented 1 month ago

URL of codelab https://developer.android.com/codelabs/basic-android-kotlin-compose-sql?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-6-pathway-1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-sql#5

In which task and step of the codelab can this issue be found? Task 6, section "Logical operators with WHERE clauses"

Describe the problem The task requests the execution of the following query: "SELECT * FROM email WHERE folder = 'inbox' AND read = false;" The column "read", however, is of type INTEGER, and not BOOLEAN, and thus the query fails.

The correct query would be "SELECT * FROM email WHERE folder = 'inbox' AND read = 0;"

Steps to reproduce?

  1. Go to the link
  2. Reach the section "Logical operators with WHERE clauses"
  3. See error in point 1.