Great, thank you very much! Am Freitag, 19. August 2016 17:15:44 UTC+2 schrieb Jan: > > Hi, > > I found the docs for the server methods here: > > > https://docs.arangodb.com/3.0/Manual/DataModeling/Documents/DocumentMethods.html#update > > in the section "Update": > collection.update(selector, data) > > Updates an existing document described by the *selector*, which must be > an object containing the *_id* or *_key* attribute. There must be a > document with that *_id* or *_key* in the current collection. This > document is then patched with the *data* given as second argument. Any > attribute *_id*, *_key* or *_rev* in *data* is ignored. > > The method returns a document with the attributes *_id*, *_key*, *_rev* > and *_oldRev*. The attribute *_id* contains the document handle of the > updated document, the attribute *_rev* contains the document revision of > the updated document, the attribute *_oldRev* contains the revision of > the old (now updated) document. > > If the selector contains a *_rev* attribute, the method first checks that > the specified revision is the current revision of that document. If not, > there is a conflict, and an error is thrown. > > Best regards > Jan > > Am Freitag, 19. August 2016 15:51:21 UTC+2 schrieb Martin Kuhn: >> >> Hi Jan, >> >> oh thank you, this works. I used the API descripton from arangojs which >> is different (it is a little bit confusing that the API differs) >> >> Is there a reference of the API which can be used for running in the >> server? >> >> TIA >> >> Am Freitag, 19. August 2016 15:26:28 UTC+2 schrieb Jan: >>> >>> Hi again, >>> >>> sorry in my example I missed a closing curly bracket. It should of >>> course be: >>> >>> db.testi.update({ _key: "123", _rev:"1083175598030" }, { city: "XYZ"}) >>> >>> Best regards >>> Jan >>> >>>
-- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
