[−][src]Enum arangors::document::options::OverwriteMode
Variants
If a document with the specified _key value exists already, nothing will be done and no write operation will be carried out. The insert operation will return success in this case. This mode does not support returning the old document version using RETURN OLD. When using RETURN NEW, null will be returned in case the document already existed.
If a document with the specified _key value exists already, it will be overwritten with the specified document value. This mode will also be used when no overwrite mode is specified but the overwrite flag is set to true.
If a document with the specified _key value exists already, it will be patched (partially updated) with the specified document value. The overwrite mode can be further controlled via the keepNull and mergeObjects parameters
if a document with the specified _key value exists already, return a unique constraint violation error so that the insert operation fails. This is also the default behavior in case the overwrite mode is not set, and the overwrite flag is false or not set either.
keepNull (optional): If the intention is to delete existing attributes with the update-insert command, the URL query parameter keepNull can be used with a value of false. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of null. This option controls the update-insert behavior only.
mergeObjects (optional): Controls whether objects (not arrays) will be merged if present in both the existing and the update-insert document. If set to false, the value in the patch document will overwrite the existing document’s value. If set to true, objects will be merged. The default is true. This option controls the update-insert behavior only. TODO need to implement the two extra modes keepNull & mergeObjects
Trait Implementations
impl<'de> Deserialize<'de> for OverwriteMode
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for OverwriteMode
[src]
Auto Trait Implementations
impl RefUnwindSafe for OverwriteMode
impl Send for OverwriteMode
impl Sync for OverwriteMode
impl Unpin for OverwriteMode
impl UnwindSafe for OverwriteMode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,