Companion
Provides some usual transaction functions for the DatasyncNode.runTransaction method.
Functions
Link copied to clipboard
Content copied to clipboard
Link copied to clipboard
fun toggle(defaultValue: Boolean = false): (DatasyncValue) -> TransactionOperation
Content copied to clipboard
Transaction function that atomically toggles the value of a boolean data node.
inline fun <T : Any> toggle(ping: T, pong: T): (DatasyncValue) -> TransactionOperation
Content copied to clipboard
Link copied to clipboard
Transaction function that atomically sets a given value to a data node only if it had no value.