1. Are you ready for the Galaxy S20? Here is everything we know so far!

Android Room: Passing method variables to @Query annotation statement

Discussion in 'Android Development' started by Guitarist, Feb 13, 2020.

  1. Guitarist

    Guitarist Newbie
    Thread Starter

    I'm trying to figure out how to pass multiple method variables to an Android Room DAO @Query statement. Below is my attempt. I'm trying to create a 'generic' @Query method to avoid duplicating it for each and every table query. As you can see from the image, I'm able to pass all my variables except the 'table' variable which identifies the table name to be searched.

    I wasn't sure if anyone here works with Room enough to know or have tried this?




    Rob likes this.

Share This Page