- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
在 Node 中,正确的执行方式是什么 Gremlin针对数据库的查询?
我当前尝试使用 Official Node OrientDB Driver :
const { ODatabase } = require('orientjs');
const db = new ODatabase({...});
db.query('g.V()')
.then(console.log, console.error);
我得到:
OrientDB.RequestError:
Cannot find a command executor for the command request: sql.g.V()
DB name="mynevo"
at child.Operation.parseError
(.../orientjs/lib/transport/binary/protocol33/operation.js:864:13)
但是,当我在网络界面中执行 g.V()
时,它工作得很好。
显然, Node 驱动程序或服务器假定查询应该是 SQL。有没有办法告诉它是 Gremlin,或者还有其他方法吗?
最佳答案
您应该能够使用执行 gremlin 命令
```
db.query('g.V()', {
language : "gremlin",
class : "com.orientechnologies.orient.graph.gremlin.OCommandGremlin"
}).then(function(res){
console.log(res);
})
```
关于node.js - 如何使用 orientjs 针对 OrientDB 执行 Gremlin?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43033355/
我想连接到我的 gremlin 服务器,我在其中提供了具有同一主机的 gremlin-server.yaml 和 remote.yaml。我的 gremlin 在 Linux 服务器上。在发出 :re
我正在使用 Gremlin-Java 和远程模式与 JanusGraph 进行交互。我现在在边缘定义一个新属性,以便在使用特定策略时过滤它们。以下是我尝试在应用程序中运行的代码,但该策略似乎被完全忽略
使用 gremlin-javascript ,我使用以下方法连接到远程服务器: const gremlin = require('gremlin') const Graph = gremlin.str
如何使用 AWS Neptune GDB 在 gremlin 控制台中将字符串值转换为整数类型。我有字符串值的属性“age”,需要将其转换为 Integer 类型以用于查询中的数学运算。感谢所有建议。
我正在尝试比较我在 gremlin-console 中查询的响应时间(图形数据库是 janusgraph,后端数据库是 hbase)。为此,有一个“clock()”步骤,它可以多次运行查询并返回平均响
我是 Gremlin 的新手,我需要帮助来设置最佳查询以选择唯一和过滤的结果。 从一个 team 开始,我会得到每个 的 player (注意:每个玩家可以为多个团队效力)由 is_friends_w
我有一组具有相同属性“TYPE”的顶点。 如何为所有给定的顶点集更新此属性。 最佳答案 您可以遍历所有顶点并使用 sideEffect 更新它们的 type 属性。例如: g.V.sideEffect
我是 Gremlin 的新手,只是想建立一个基本的图表。我已经能够在新顶点上做一个基本的 addEdge,即 gremlin> v1 = g.addVertex() ==>v[200004] grem
假设我想从我的数据库中获取一些顶点: g.V(1, 2, 3) 然后我有另一组顶点: g.V(4, 5, 6) 想象一下,这不仅仅是 g.V() ,但是一些更复杂的遍历来获取我的顶点。但是遍历必须从V
当我查询路径时,例如: g.V(1).inE().outV().inE().outV().inE().outV().path() path()中既有顶点也有边,请问有没有办法只计算路径中的顶点数而忽略
在 Neptune 工作台上使用 python gremlin,我有两个功能: 第一个添加一个带有一组属性的Vertex,并返回遍历操作的引用 第二个增加了遍历操作。 出于某种原因,第一个函数的操作被
我想创建一个显示连接和连接强度的边缘列表。此示例图包含 4 个人以及他们参加研讨会 A 和 B 的信息,包括他们参加的天数和他们停留的小时数。我想通过研讨会节点建立联系,如果他们在同一天参加同一个研讨
我在 gremlify 上描述了这里的图表.所以我有四种类型的顶点:内容、用户、组和视频。 Content 和 Group 作为容器,User 和 Video 是叶子。此外,我在组和用户、组和内容、组
Gremlin 查询通常使用或生成列表。有时希望能够反转列表。目前 Gremlin 没有 reverse步骤,因此您不能执行以下操作: g.inject(['A','B','C','D']).reve
我有一个简单的图,其中 parent 和 child 是顶点。 parent 与他们的 child 有“isParentOf”关系。所有顶点都有一个属性:“familyName”。 我想使用 grem
我有这样的结构: 组 -> 字段 -> 值 和命令 g.V().hasLabel('groups').out('fields').out('values') 如何按字段和“组”顶点对这些值进行分组?
我很难在 gremlin 中找出以下场景的查询。这是有向图(可能是循环的)。 我想获得前 N 个有利节点,从节点“Jane”开始,这里的优先级定义为: favor(Jane->Lisa) = edge
这是一个非常简单的查询: g.V('customerId').out().path() 这个的 JSON 输出是 { "requestId":"96b26c1d-d032-2004-d36e-
有没有一种方法可以使用 Gremlin 查询仅返回图节点所有属性的子集? 我知道您可以使用转换管道连接属性值,但我更感兴趣的是获得结构化结果(例如 propertyName1 = value1、pro
我将 AWS Neptune Gremlin 与 gremlin_python 一起使用. 我在属性(property)中的日期按要求存储为日期时间 Neptune specs . 我使用 Pytho
我是一名优秀的程序员,十分优秀!