dittolive_ditto/store/query_builder/update.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
/// Describes the result of an update operation performed on a [`DittoMutDocument`].
///
/// - set: Describes the `set` update that was performed.
/// - removed: Describes the `remove` update that was performed.
/// - incremented: Describes the `increment` update that was performed.
///
/// [`DittoMutDocument`]: crate::store::query_builder::DittoMutDocument
#[deprecated(
since = "4.14.4",
note = "Will be removed in SDK 5.0. Use DQL queries instead"
)]
pub struct UpdateResult {
/// The type of update operation performed.
pub op: UpdateOp,
/// The ID of the document updated.
pub doc_id: String,
/// The path to the field in the document that was updated.
pub path: String,
/// A printable representation of the updated value.
pub value: Box<dyn std::fmt::Debug>, // we only care if we can print the value
}
/// Update operation performed on a `DittoMutDocument`.
#[deprecated(
since = "4.14.4",
note = "Will be removed in SDK 5.0. Use DQL queries instead"
)]
pub enum UpdateOp {
/// Describes the `set` update that was performed.
Set,
/// Describes the `remove` update that was performed.
Removed,
/// Describes the `replace_with_counter` update that was performed.
ReplacedWithCounter,
/// Describes the `increment` update that was performed.
Incremented,
}