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

Make meta-properties accessible via values(...)-step

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • 3.3.1
    • None
    • structure
    • None

    Description

      I'm currently running into a situation where I'd like to access meta-properties through the values(...)-method. Unfortunately, the signature of values() only takes strings, so this is not possible:

      g.V().values(T.id)
      

      Of course, there's the trivial workaround:

      g.V().id()
      

      However, I'd like to get values for multiple properties, so the workaround becomes ugly:

      g.V().union(__.id(), __.values('key'))
      

      That there would be no overload of values(...) supporting T-accessors is a bit odd. has(...) has an extra overload for T-accessors, property(...) allows arbitrary objects to be passed in as key. The valueMap-method allows including T-accessors in the returned map.

      Would it be possible to relax the signature of values(...) to take an arbitrary list of objects instead of property keys of type string? If the discussion here turns out in favor of such a relaxation, I could try to implement the change.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              daniel.weber Daniel C. Weber
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: