Package dev.fritz2.repositories.localstorage

Types

LocalStorageEntity
Link copied to clipboard
js
class LocalStorageEntity<T, I>(resource: Resource<T, I>, prefix: String) : EntityRepository<T, I>
provides crud-functions for localStorage to deal with a single entity
LocalStorageQuery
Link copied to clipboard
js
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

localStorageEntity
Link copied to clipboard
js
fun <T, I> localStorageEntity(resource: Resource<T, I>, prefix: String): EntityRepository<T, I>
provides crud-functions for localStorage to deal with a single entity
localStorageQuery
Link copied to clipboard
js
fun <T, I, Q> localStorageQuery(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