【问题标题】:DataStax Studio : Update an integer property of nodeDataStax Studio:更新节点的整数属性
【发布时间】:2020-05-09 07:41:23
【问题描述】:

我们有一个具有 int 类型属性的顶点,当我尝试为该节点更新该属性时,例如

g.V().hasLabel("business").hasNot("authenticityScore").properties("authenticityScore",0).iterate()

此查询未更新记录。

在从 Datastax 工作室更新 int 值时,是否需要处理任何类型转换

【问题讨论】:

    标签: database datastax gremlin datastax-enterprise datastax-enterprise-graph


    【解决方案1】:

    该语法不正确。 properties() 步骤从图形元素(例如顶点)获取属性列表,但 property() 设置属性键和值,因此您的遍历应该写为:

    g.V().hasLabel("business").hasNot("authenticityScore").
      property("authenticityScore",0).iterate()
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-01
      • 2023-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多