示例#1
0
        /// <summary>
        /// Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are
        /// specified by the _key attributes in the documents in values.
        /// </summary>
        /// <seealso><a href="https://docs.arangodb.com/current/HTTP/Document/WorkingWithDocuments.html#replace-documents">API
        /// *      Documentation</a></seealso>
        /// <param name="values">A List of documents (POJO, VPackSlice or String for Json)</param>
        /// <returns>information about the documents</returns>
        /// <exception cref="ArangoDBException"/>
        /// <exception cref="ArangoDBException"/>
        public virtual MultiDocumentEntity <DocumentUpdateEntity <T> > replaceDocuments <T>(System.Collections.Generic.ICollection <T> values)
        {
            DocumentReplaceOptions @params = new DocumentReplaceOptions
                                                 ();

            return(this.executor.execute(this.replaceDocumentsRequest(values, @params), this.replaceDocumentsResponseDeserializer
                                             (values, @params)));
        }
示例#2
0
 /// <summary>
 /// Replaces the document with key with the one in the body, provided there is such a document and no precondition is
 /// violated
 /// </summary>
 /// <seealso><a href="https://docs.arangodb.com/current/HTTP/Document/WorkingWithDocuments.html#replace-document">API
 /// *      Documentation</a></seealso>
 /// <param name="key">The key of the document</param>
 /// <param name="value">A representation of a single document (POJO, VPackSlice or String for Json)
 ///     </param>
 /// <param name="options">Additional options, can be null</param>
 /// <returns>information about the document</returns>
 /// <exception cref="ArangoDBException"/>
 /// <exception cref="ArangoDBException"/>
 public virtual DocumentUpdateEntity <T> replaceDocument <T>(string
                                                             key, T value, DocumentReplaceOptions options)
 {
     return(this.executor.execute(this.replaceDocumentRequest(key, value, options), this.replaceDocumentResponseDeserializer
                                      (value)));
 }