apache / apache/hugegraph

[Feature] java client创建edge创建Edge实例时支持直接指定源和目的vertex的id

Open
#1,483 3 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
Java
Stars
3.2k
Forks
636
Avg merge
3d 11h
Merged PRs (30d)
14

Description

## Feature Description:

当前java client创建Edge时需要传入源和目的vertex的实例,但是创建edge时应该只要vertex的id信息。是否支持直接指定vertex的id值,这样可以减少两个vertex实例的创建

当前创建一个edge需要类似这样操作:
```
Vertex marko = new Vertex("person");
marko.id("marko");
Vertex lop = new Vertex("software");
lop.id("lop");
Edge markoCreateLop = new Edge("created").source(marko).target(lop)
.property("date", "2017-12-10").property("weight", 0.8);
```
是否可以支持以下的方式直接创建:
```
Edge markoCreateLop = new Edge("created").source("marko").target("lop")
.property("date", "2017-12-10").property("weight", 0.8);
```

Contributor guide

Open the contributing guide

Research direction

Start with the Java client's Edge API and its source and target methods, comparing the existing Vertex-based calls with the requested ID-based form. Use the example in the issue to check that an edge can be created from the two IDs while retaining its label and properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.