GumpacG opened a new pull request, #3550:
URL: https://github.com/apache/tinkerpop/pull/3550

   ## Summary
   
   [TINKERPOP-3186](https://issues.apache.org/jira/browse/TINKERPOP-3186) 
normalized `Element.properties` to a flat list in the JavaScript, Python, and
   .NET drivers, which removed the convenient "properties keyed by name" map 
view. This PR adds an
   opt-in `propertyMap()` helper on the **Vertex** type in those three drivers 
that restructures the
   flat properties list into a map of `property key -> list of VertexProperty 
objects` (the same
   shape as the Gremlin `propertyMap()` step). The default flat-list 
representation is unchanged.
   
   Scope note: `gremlin-go` is intentionally **not** included. Go's 
`Element.properties` was always a
   flat list and was never part of the 3186 change, so it has no lost map view 
for this ticket to
   restore. Adding it to Go would be a new convenience without the ticket's 
regression rationale, so
   it is left out.
   
   Vertex-only: only vertices can hold multiple properties under one key 
(multi-properties), so the
   list-per-key shape is meaningful only there. Edges and vertex-properties are 
single-valued per key
   and keep their existing single-property access.
   
   ## Changes
   
   | GLV | Method | Returns |
   |---|---|---|
   | JavaScript | `vertex.propertyMap()` | plain (null-prototype) object `{ 
[key]: VertexProperty[] }` |
   | Python | `vertex.property_map()` | `dict[str, list]` |
   | .NET | `Vertex.PropertyMap()` | `Dictionary<string, List<VertexProperty>>` 
|
   
   ## Before / After (JavaScript, `marko` vertex)
   
   ```js
   v.properties                    // [ VertexProperty{key:'name',...}, 
VertexProperty{key:'age',...} ]
   v.propertyMap()                 // { name: [ VertexProperty{...} ], age: [ 
VertexProperty{...} ] }
   ```
   
   ## Tests
   
   Per-GLV unit tests: multi-property grouping, single-valued, and empty cases.
   
   ## Docs
   
   - `docs/src/upgrade/release-3.8.2.asciidoc` - "Vertex propertyMap() Helper" 
note under "Upgrading for Users".
   - `CHANGELOG.asciidoc` - entry under the 3.8.2 section.
   
   
   Assisted-by: Kiro: Claude Opus 4.8


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to