Questions tagged as 'android-room'

1
answer

record count with Room and LiveData in android studio

How do I call this function in the viewmodel adapter: @Query("select * from PRODUTO") int getCountProdutos(); My viewmodel: public class ProdutoListViewModel extends AndroidViewModel { private final LiveData<List<PRODUTO>> it...
asked by 28.05.2018 / 16:05
0
answers

How to use 2 databases using Room Sqlite?

Hello. Is it possible to use multiple DBs using Sqlite's Room? In my case I need to use 2 DB, if it is possible how to change from DB1 to DB2 dynamically?     
asked by 06.11.2018 / 22:25
0
answers

Insert with relation in the Room

I'm not really sure how Relation Room works, I'm trying to do an insert of two related tables, many ORMs can do this, insert Person and Books into the table, without needing to set the id of books (which is...
asked by 18.01.2018 / 17:30