commonMain.maryk.datastore.shared.updates.Update.kt Maven / Gradle / Ivy
The newest version!
package maryk.datastore.shared.updates
import maryk.core.models.IsRootDataModel
import maryk.core.properties.types.Key
import maryk.core.query.changes.IsChange
import maryk.core.values.Values
/** Describes an update on an object with [key] in [dataModel] with [version] */
sealed class Update(
val dataModel: DM,
val key: Key,
val version: ULong
) : IsUpdateAction {
class Addition(
dataModel: DM,
key: Key,
version: ULong,
val values: Values
): Update(dataModel, key, version)
class Deletion(
dataModel: DM,
key: Key,
version: ULong,
val isHardDelete: Boolean
): Update(dataModel, key, version)
class Change(
dataModel: DM,
key: Key,
version: ULong,
val changes: List
): Update(dataModel, key, version)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy