Package dev.fritz2.repository.localstorage

Types

Link copied to clipboard
class LocalStorageEntity<T, I>(resource: Resource<T, I>, prefix: String) : EntityRepository<T, I>

provides crud-functions for localStorage to deal with a single entity

Link copied to clipboard
class LocalStorageQuery<T, I, Q>(resource: Resource<T, I>, prefix: String, runQuery: (List<T>, Q) -> List<T>) : QueryRepository<T, I, Q>

provides functions to deal with queries to a specific Resource in localStorage

Functions

Link copied to clipboard
fun <T, I> localStorageEntityOf(resource: Resource<T, I>, prefix: String): EntityRepository<T, I>

provides crud-functions for localStorage to deal with a single entity

Link copied to clipboard
fun <T, I, Q> localStorageQueryOf(resource: Resource<T, I>, prefix: String, runQuery: (List<T>, Q) -> List<T> = { entities, _ -> entities }): LocalStorageQuery<T, I, Q>

provides functions to deal with queries to a specific Resource in localStorage