Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new method: listEndNodes #272

Merged
merged 5 commits into from
Dec 6, 2023
Merged

Conversation

knqiufan
Copy link
Collaborator

@knqiufan knqiufan commented Dec 4, 2023

add new method: listEndNodes
add new test case about listEndNodes

Copy link
Collaborator

@CorvusYe CorvusYe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order of parameters may be different for everyone and can be discussed.
Thanks for your time.

This is for #261.
cc: @wey-gu

* @param startId 开始节点的id
* @return 结束节点列表
*/
default List<?> listEndNodes(Class<?> endType, Class<?> edgeType, I startId) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be more in line with normal thinking if we switched the first parameter and the third parameter? What do you think?
Line 431 is the same.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interchanging the first and third arguments is exactly easier to understand. Thank you for these details!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great update!

@CorvusYe
Copy link
Collaborator

CorvusYe commented Dec 4, 2023

@shbone
Do you have any suggestions for this implementation?

@CorvusYe CorvusYe requested a review from wey-gu December 4, 2023 15:02
@codecov-commenter
Copy link

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (386b730) 0.00% compared to head (b78612b) 0.00%.
Report is 26 commits behind head on master.

Files Patch % Lines
...g/nebula/contrib/ngbatis/proxy/NebulaDaoBasic.java 0.00% 8 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #272   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files          75      75           
  Lines        2566    2574    +8     
  Branches      278     279    +1     
======================================
- Misses       2566    2574    +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -501,6 +501,12 @@ public void listStartNodes() {
System.out.println(JSON.toJSONString(personList));
}

@Test
public void listEndNodes() {
List<Person> personList = repository.listEndNodes("易小海", Like.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoud we default think that the user know endType of endNodes? @CorvusYe

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoud we default think that the user know endType of endNodes? @CorvusYe

@shbone
Like listStartNodes, listEndNodes provides two apis where you can specify the type of endNode.
Do I understand your question correctly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes,one is that you can specify the type of endNode, another is that you dont't know the type of endNode tha you just know the type of startNode and edge.

@shbone
Copy link
Contributor

shbone commented Dec 6, 2023

@shbone Do you have any suggestions for this implementation?

NO, I have no suggestion temporarily

Comment on lines 470 to 471
new Class[]{Serializable.class, Class.class, Class.class}, endVertexName, edgeName,
startId);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type order here looks like it doesn't match the argument order.

@CorvusYe CorvusYe merged commit 23ca9fc into nebula-contrib:master Dec 6, 2023
1 check passed
@wey-gu
Copy link
Member

wey-gu commented Dec 7, 2023

🎉!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants