class StockbrotRepository
Repository for accessing, inserting and filtering StockbrotQuotes.
<init> |
Constructor that allows repository creation from a Context. StockbrotRepository(context: Context)
Repository for accessing, inserting and filtering StockbrotQuotes. StockbrotRepository(database: StockAppDatabase) |
quotes |
List of all StockbrotQuotes. val quotes: LiveData<List<StockbrotQuote>> |
addStockbrotQuote |
Adds a StockbrotQuote into the database. suspend fun addStockbrotQuote(stockbrotQuote: StockbrotQuote): Unit |
removeStockbrotQuote |
Removes a specific StockbrotQuote from the database. suspend fun removeStockbrotQuote(stockbrotQuote: StockbrotQuote): Unit |
resetStockbrot |
Removes all StockbrotQuotes from the database. suspend fun resetStockbrot(): Unit |
stockbrotQuoteById |
Returns a StockbrotQuote with the matching id. fun stockbrotQuoteById(id: String): StockbrotQuote? |
stockbrotQuoteWithId |
Returns a StockbrotQuote with the matching id, wrapped in LiveData. fun stockbrotQuoteWithId(id: String): LiveData<StockbrotQuote> |