Recently I faced a situation that need to query for specific object type but without passing it with method I could not find any way. So I want to do some thing like:
@Query(" select * from table_a where type = ENUM_A")
fun queryForTypeA()
But its alternative bellow is works but I do not want to pass any thing.
@Query(" select * from table_a where type =:type")
fun queryForTypeA(type: EnumType = ENUM_A)
The thing is if I find out the proper way in some other query I wanna exclude some other ENUMs so passing in function is not working there and no sense. I wanna achieve something like this:
@Query(" select * from table_a where type NOT ENUM_A")
fun queryForAllTypesExceptA()