简体   繁体   English

在 Arango DB 更新中更新动态列值

[英]Update Dynamic column values in Arango DB Update

Given the following document structure:给定以下文档结构:

Input:输入:

           LET A=status: 'free',updatedby:'SYSTEM',updatedate:'28/05/2021 12:15:34'

     

I want to update all column values in a single update.我想在一次更新中更新所有列值。

find the given query:找到给定的查询:

           UPDATE { _key: @key }  WITH { A } IN Slot RETURN NEW

--here A is let value. --这里 A 是让值。

Is it possible?可能吗?

You can define an object and then use that to update an existing document by _key:您可以定义一个 object,然后使用它通过 _key 更新现有文档:

LET A = { status: 'free', updatedby: 'SYSTEM', updatedate: '28/05/2021 12:15:34' }
UPDATE @key WITH A IN Slot RETURN NEW

You can also inline the object:您还可以内联 object:

UPDATE @key WITH { status: 'free', updatedby: 'SYSTEM', updatedate: '28/05/2021 12:15:34' } IN Slot RETURN NEW

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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