Manabu Tokunaga created TINKERPOP-2989:
------------------------------------------
Summary: Provide a Way to Set Default Cardinality in Traversals
Key: TINKERPOP-2989
URL: https://issues.apache.org/jira/browse/TINKERPOP-2989
Project: TinkerPop
Issue Type: Improvement
Components: driver
Reporter: Manabu Tokunaga
h1. Why We Need This?
When using Neptune with Gremlin, I've noticed the need to specify cardinality
in every property() call. While I'm not arguing against the importance of
cardinality, it would enhance code clarity or code duplication that may be
required to work with target engine if Gremlin allowed users to set a preferred
default cardinality. This way, we could potentially omit the cardinality
parameter in subsequent property() calls, leading to tidier and less confusing
code. This also allow me to code for graph systems that do not support
cardinality or support other types of cardinalities than the {{{}set{}}}.
h2. Proposed Implementation
TinkerPop can introduce {{g.with(defaultCardinality, single)}} - this would
provide the hint a graph would need to override their default cardinality for
every property mutation where cardinality is not explicit.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)