database - DataStax Studio:更新节点的整数属性
问题描述
我们有一个具有 int 类型属性的顶点,当我尝试为该节点更新该属性时,例如
g.V().hasLabel("business").hasNot("authenticityScore").properties("authenticityScore",0).iterate()
此查询不更新记录。
从 Datastax Studio 更新 int 值时,我需要处理任何类型转换吗
解决方案
该语法不正确。该properties()
步骤从图形元素(例如 Vertex)获取属性列表,但property()
设置属性键和值,因此您的遍历应写为:
g.V().hasLabel("business").hasNot("authenticityScore").
property("authenticityScore",0).iterate()
推荐阅读
- firebase - Firebase 项目初始化错误:未为此项目设置云资源位置
- spring - Spring Batch 持久化作业元数据
- javascript - 如何从反应组件的所有详细信息标签中添加或删除“打开”属性?
- python - 对异步端点的调用被另一个线程阻塞
- cordova - 是否可以用 Cordova 包装 ASP.Net Core 网页?
- java - 为什么在数据快照中同时执行 if 和 else 语句?
- python - Keras - 如何将图像数组传递给 ImageDataGenerator.flow
- javascript - 如何使用锚标签通过链接打开我安装的应用程序,如下图所示
- kotlin - 如何使用 KTOR 库配置 ssl?
- android - 更改背景颜色后 AppCompatButton 变平