Android/SQLite - Bit operation on WHERE clause Android/SQLite - Bit operation on WHERE clause sqlite sqlite

Android/SQLite - Bit operation on WHERE clause


The query function accepts only strings as parameters, but in SQLite, numbers and strings never compare equal (unless you have type affinity, but this works only for column values, not expressions).

You have to explicitly convert the parameters back to a number:

((...) >> 1 = CAST(? AS INTEGER)) AND ...