gauc/couchbase/types/
operation.rs

1#[repr(u32)]
2#[derive(Debug, Clone, Copy)]
3pub enum Operation {
4    /**
5     * The default storage mode. This constant was added in version 2.6.2 for
6     * the sake of maintaining a default storage mode, eliminating the need
7     * for simple storage operations to explicitly define operation.
8     * Behaviorally it is identical to Set
9     * in that it will make the server unconditionally store the item, whether
10     * it exists or not.
11     */
12    Upsert = 0,
13
14    /**
15     * Will cause the operation to fail if the key already exists in the
16     * cluster.
17     */
18    Add = 1,
19
20    /**
21     * Will cause the operation to fail _unless_ the key already exists in the
22     * cluster.
23     */
24    Replace = 2,
25
26    /** Unconditionally store the item in the cluster */
27    Set = 3,
28
29    /**
30     * Rather than setting the contents of the entire document, take the value
31     * specified in value and _append_ it to the existing bytes in
32     * the value.
33     */
34    Append = 4,
35
36    /**
37     * Like Append, but prepends the new value to the existing value.
38     */
39    Prepend = 5
40}