You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/11/28 03:18:49 UTC
[GitHub] [incubator-hugegraph] JasonQi2020 opened a new issue, #2036: [Question] Can I use Tinkerpop class to access HugeGraph DB ?
JasonQi2020 opened a new issue, #2036:
URL: https://github.com/apache/incubator-hugegraph/issues/2036
### Problem Type (问题类型)
others (please edit later)
### Before submit
- [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题
### Environment (环境信息)
not related with environment.
### Your Question (问题描述)
Apart from HugeClient, is it possible to use Tinkerpop API to access the data in HugeGraph ?
for example: the follow code is Tinkerpop compatible APIs call , can I get TinerPop GraphTraversalSource Object from HugeClient or the other class so that I will query data with ?
GraphTraversalSource g = graph.traversal();
GraphTraversal<Vertex, Vertex> vertices = g.V();
List<Edge> edges = g.E().toList();
List<Object> names = g.V().inE("knows").limit(2)
.outV().values("name").toList();
names = g.V().as("a")
.out("knows")
.and()
.out("created").in("created").as("a").values("name")
.toList();
I found the Class HugeGraph implements Tinkerpop interface Graph by reading the source code,.
by calling method traversal() from HugeGraph object , the GraphTraversalSource object is accessible. but How can I get it from HugeClient ? Thanks.
### Vertex/Edge example (问题点 / 边数据举例)
_No response_
### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-hugegraph] imbajin closed issue #2036: [Question] Can I use Tinkerpop class to access HugeGraph DB ?
Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin closed issue #2036: [Question] Can I use Tinkerpop class to access HugeGraph DB ?
URL: https://github.com/apache/incubator-hugegraph/issues/2036
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-hugegraph] javeme commented on issue #2036: [Question] Can I use Tinkerpop class to access HugeGraph DB ?
Posted by GitBox <gi...@apache.org>.
javeme commented on issue #2036:
URL: https://github.com/apache/incubator-hugegraph/issues/2036#issuecomment-1341043034
There are 2 ways to execute gremlin statements:
- Call [gremlin API](https://hugegraph.apache.org/docs/clients/restful-api/gremlin) through hugegraph-client or any http-rest-client.
- Connect to the websocket port exposed by hugegraph gremlin-server through the standard tinkerpop-client, for more details: https://github.com/apache/incubator-hugegraph/issues/1501
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org