Room query with dynamic values using placeholders
问题 I am implementing a Room database (because I want to move away from Loaders) and I have a query that selects objects based on the IN operator: @Query(SELECT * FROM table WHERE icon IN(:icons)) LiveData<List<Result>> getResults(String[] icons); The issue is that the :icons array is generated dynamically during runtime, first I generate placeholders for it and then replace them with the values, like so: @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super