简体   繁体   中英

Is there a way to "touch" a document in ArangoDb

I need to be able to "touch" a document (for optimistic purposes) in ArangoDb in order to check and update the _rev without modifying any other data in the document. I have yet to find a way to do this generically with AQL or Javascript Driver without knowing something about existing data in the document. What am I missing?

Some research and testing points to using AQL like:

LET doc = DOCUMENT(@id)
REPLACE doc IN @@collection OPTIONS { ignoreRevs: false, revision: @revision }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM