Lists

interface Lists

Functions

Link copied to clipboard
abstract suspend fun addListItem(listSidOrUniqueName: String, itemData: <Error class: unknown class>): SyncList.Item

Add Item to the SyncList without opening it.

Link copied to clipboard
inline suspend fun <T : Any> Lists.addListItem(listSidOrUniqueName: String, itemData: T): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and adds it as a new item to the end of the specified SyncList.

Link copied to clipboard
abstract suspend fun addListItemWithTtl(listSidOrUniqueName: String, itemData: <Error class: unknown class>, ttl: <Error class: unknown class>): SyncList.Item

Add Item to the SyncList without opening it.

Link copied to clipboard
inline suspend fun <T : Any> Lists.addListItemWithTtl(listSidOrUniqueName: String, itemData: T, ttl: <Error class: unknown class>): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and adds it as a new item to the end of the specified SyncList with a specified TTL.

Link copied to clipboard
abstract suspend fun create(uniqueName: String? = null, ttl: <Error class: unknown class> = Duration.INFINITE): SyncList

Create new SyncList object.

Link copied to clipboard
abstract suspend fun getListItem(listSidOrUniqueName: String, itemIndex: Long, useCache: Boolean = true): SyncList.Item?

Retrieve Item from the SyncList without opening it.

Link copied to clipboard
abstract suspend fun mutateListItem(listSidOrUniqueName: String, itemIndex: Long, mutator: suspend (<Error class: unknown class>) -> <Error class: unknown class>?): SyncList.Item

Mutate value of the existing SyncList.Item without opening it using provided Mutator function.

Link copied to clipboard
inline suspend fun <T : Any> Lists.mutateListItem(listSidOrUniqueName: String, itemIndex: Long, crossinline mutator: suspend (currentData: T) -> T?): SyncList.Item

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncList.Item

Link copied to clipboard
abstract suspend fun mutateListItemWithTtl(listSidOrUniqueName: String, itemIndex: Long, ttl: <Error class: unknown class>, mutator: suspend (<Error class: unknown class>) -> <Error class: unknown class>?): SyncList.Item

Mutate value of the existing SyncList.Item without opening it using provided Mutator function.

Link copied to clipboard
inline suspend fun <T : Any> Lists.mutateListItemWithTtl(listSidOrUniqueName: String, itemIndex: Long, ttl: <Error class: unknown class>, crossinline mutator: suspend (currentData: T) -> T?): SyncList.Item

Serializes the value returned by Mutator function into an equivalent JsonObject using a serializer retrieved from reified type parameter and uses the JsonObject to mutate value of the SyncList.Item

Link copied to clipboard
abstract suspend fun openExisting(sidOrUniqueName: String): SyncList

Open existing SyncList by SID or unique name.

Link copied to clipboard
abstract suspend fun openOrCreate(uniqueName: String, ttl: <Error class: unknown class> = Duration.INFINITE): SyncList

Open existing SyncList by unique name or create a new one if specified name does not exist.

Link copied to clipboard
abstract fun queryItems(listSidOrUniqueName: String, startIndex: Long? = null, includeStartIndex: Boolean = true, queryOrder: <Error class: unknown class> = QueryOrder.Ascending, pageSize: Int = kDefaultPageSize, useCache: Boolean = true): SyncIterator<SyncList.Item>

Retrieve items without opening the SyncList.

Link copied to clipboard
abstract suspend fun remove(sidOrUniqueName: String)

Remove SyncList without opening it.

Link copied to clipboard
abstract suspend fun removeListItem(listSidOrUniqueName: String, itemIndex: Long)

Remove SyncList.Item without opening the SyncList.

Link copied to clipboard
abstract suspend fun setListItem(listSidOrUniqueName: String, itemIndex: Long, itemData: <Error class: unknown class>): SyncList.Item

Set Item in the SyncList without opening it.

Link copied to clipboard
inline suspend fun <T : Any> Lists.setListItem(listSidOrUniqueName: String, itemIndex: Long, itemData: T): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncList.Item.

Link copied to clipboard
abstract suspend fun setListItemWithTtl(listSidOrUniqueName: String, itemIndex: Long, itemData: <Error class: unknown class>, ttl: <Error class: unknown class>): SyncList.Item

Set Item in the SyncList without opening it.

Link copied to clipboard
inline suspend fun <T : Any> Lists.setListItemWithTtl(listSidOrUniqueName: String, itemIndex: Long, itemData: T, ttl: <Error class: unknown class>): SyncList.Item

Serializes the given value into an equivalent JsonObject using a serializer retrieved from reified type parameter and set it as value of the SyncList.Item.

Link copied to clipboard
abstract suspend fun setTtl(sidOrUniqueName: String, ttl: <Error class: unknown class>)

Set time to live for SyncList without opening it.