Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2989

Provide a Way to Set Default Cardinality in Traversals

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • driver
    • None

    Description

      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.

      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.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            manabubeach Manabu Tokunaga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: