DittoWriteStrategy

Defines the various strategies available when inserting a document into a collection.

Entries

Link copied to clipboard

The existing document will be merged with the document being inserted, if there is a pre-existing document.

Link copied to clipboard

Insert the document only if there is not already a document with the same identifier in the store. If there is already a document in the store with the same identifier then this will be a no-op.

Link copied to clipboard

Insert the document, with its contents treated as default data, only if there is not already a document with the same identifier in the store. If there is already a document in the store with the same identifier then this will be a no-op. Use this strategy if you want to insert default data for a given document identifier, which you want to treat as common initial data amongst all peers and that you expect to be mutated or overwritten in due course.

Link copied to clipboard

The existing document will be updated based on the document being inserted. If there is a pre-existing document in the local store with the same ID, compare its value to the current value of the document. Update any differing register and attachment leaf values in the document to match the given value. Nothing is removed. This is equivalent to using an if statement to check each value in the provided payload against the local document value.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun asWriteStrategyRs(): WriteStrategyRs_t
Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.