Clarify Gremlin-Groovy __. prefix guidance and datetime() return type - #3615
Open
spmallette wants to merge 1 commit into
Open
Clarify Gremlin-Groovy __. prefix guidance and datetime() return type#3615spmallette wants to merge 1 commit into
spmallette wants to merge 1 commit into
Conversation
Reframe the as/in/not guidance in the Gremlin-Groovy differences section: still recommend the __. prefix, but justify it as the way to get deterministic, portable resolution rather than a hard reserved-word rule. Clarify that a bare not(...) resolves to P.not(P) (predicate negation) whereas __.not(traversal) is the filter step, and advise being explicit (__.not(...) for the step, P.not(...) for the predicate). Note that datetime() returns a java.time.OffsetDateTime, and record in the canonical Gremlin literal types table that the all-lowercase 'datetime' form is also accepted alongside 'DateTime'. Assisted-by: Kiro:claude-opus-4.8
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3615 +/- ##
============================================
+ Coverage 76.35% 76.47% +0.12%
- Complexity 13424 14297 +873
============================================
Files 1012 1036 +24
Lines 60341 64620 +4279
Branches 7075 7664 +589
============================================
+ Hits 46076 49421 +3345
- Misses 11548 12108 +560
- Partials 2717 3091 +374 ☔ 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.
This is a small, conservative documentation fix touching two reference sections.
Gremlin-Groovy differences (
reference/gremlin-variants.asciidoc)The section previously stated that
as,in, andnotare reserved words that "must always be prefixed with__.". The recommendation to use the__.prefix is kept, but the justification is reframed: rather than a hard reserved-word parser rule, the reason to be explicit is to get deterministic, portable resolution — use__.for an anonymous traversal step, andP.when you actually want a predicate.This is clarified especially for
not: a barenot(...)resolves toP.not(P)(predicate negation), whereas__.not(traversal)is the filter step. Being explicit (__.not(...)for the step,P.not(...)for the predicate) avoids the ambiguity.A note is also added that
datetime()returns ajava.time.OffsetDateTime, which the section did not previously state.Canonical Gremlin literal types (
reference/the-traversal.asciidoc)The
DateTimerow now notes that the all-lowercasedatetimeform is also accepted (the grammar acceptsdatetime,DateTime, andDATETIME).Testing
Built the rendered documentation locally (
bin/process-docs.sh) and reviewed the affected pages in the HTML output; all three changes render as intended.