MongoItemRepository

ItemRepository based on MongoDB.

Author

Jan Müller
class MongoItemRepository(database: CoroutineDatabase) : ItemRepository

Constructors

<init>
Link copied to clipboard
fun <init>(database: CoroutineDatabase)

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getAll
Link copied to clipboard
Retrieves all Items from the repository.
open suspend override fun getAll(): List<Item>
getById
Link copied to clipboard
Retrieves an Item from the repository.
open suspend override fun getById(id: String): Item?
hashCode
Link copied to clipboard
open override fun hashCode(): Int
hasItemWithId
Link copied to clipboard
Checks if the repository contains a specific Item.
open suspend override fun hasItemWithId(id: String): Boolean
insert
Link copied to clipboard
Inserts an Item into the repository.
open suspend override fun insert(item: Item)
removeById
Link copied to clipboard
Removes an Item from the repository.
open suspend override fun removeById(id: String)
toString
Link copied to clipboard
open override fun toString(): String
updateAmount
Link copied to clipboard
Updates the amount of an Item from the repository.
open suspend override fun updateAmount(id: String, change: Int)