Repository navigation
Clarify how ElementIdStrategy works in the reference docs - #3890
Open
spmallette wants to merge 1 commit into
Open
spmallette wants to merge 1 commit into
spmallette wants to merge 1 commit into
Conversation
The ElementIdStrategy section said the strategy made identifier assignment possible "by using vertex and edge indices under the hood", which does not describe what it does. The strategy stores the assigned identifier in a property (__id by default) and rewrites identifier-based steps such as g.V(id), g.E(id), hasId(), id() and property(id, value) on addV()/addE() to use that property. This change describes that mechanism, names the default key and the UUID default used when no identifier is supplied, and explains why elementMap() and element string output show the graph-generated identifier while id() returns the assigned one. The live example now also adds and looks up an edge, a second example shows a custom key set with idPropertyKey(), the builder options link to the javadoc, and the IMPORTANT note names the property key that should be indexed. Assisted-by: Kiro:claude-opus-5.5
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3890 +/- ##
============================================
+ Coverage 76.35% 78.78% +2.42%
- Complexity 13424 16063 +2639
============================================
Files 1012 1084 +72
Lines 60341 69272 +8931
Branches 7075 8363 +1288
============================================
+ Hits 46076 54573 +8497
+ Misses 11548 11403 -145
- Partials 2717 3296 +579 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ElementIdStrategy section said the strategy made identifier
assignment possible "by using vertex and edge indices under the hood",
which does not describe what it does. The strategy stores the assigned
identifier in a property (__id by default) and rewrites identifier-based
steps such as g.V(id), g.E(id), hasId(), id() and property(id, value)
on addV()/addE() to use that property.
This change describes that mechanism, names the default key and the
UUID default used when no identifier is supplied, and explains why
elementMap() and element string output show the graph-generated
identifier while id() returns the assigned one. The live example now
also adds and looks up an edge, a second example shows a custom key set
with idPropertyKey(), the builder options link to the javadoc, and the
IMPORTANT note names the property key that should be indexed.
A committer can direct the automation behind this PR with a comment:
assist:rebase— ask the maintainer to rebase the branch onto the latestmaster.assist:feedback <details>— send<details>to the maintainer to act on.Comments without the
assist:prefix are not actioned by the automation.🤖 Agent assisted PR.