• Eric Myhre's avatar
    Selector implementation! · cd9283dd
    Eric Myhre authored
    This is a draft.  There's a LOT of hard design choices which are not
    yet completely settled here.
    
    Corresponding updates to the ipld/specs repo will be coming soon:
    these implementations match a very recursive concept of selectors.
    (https://github.com/ipld/specs/pull/116 is roughly this.)
    
    There's so many things to go over, here.
    
    - selectors at all
    - selectFields is kind of a special case of unions
    - selectPath as a concept is gone; is a degenerate case of selectFields
    - we've added some new methods to help narrow down search spaces
    - we have serial selector spec parsers...!  (very hand-rolled.)
    - the idea of always reporting candidates vs definite match parents
      is dropped for now; it requires a different algo with different
      performance characteristics, so, we'll do it as such -- later.
    - we ended up with unions being *in*!  They're going to be used
      internally by a bunch of other things -- see comment blocks in
      the code about that (tl;dr recursives imply a need of unions).
    
    More docs will be coming in future commits; this is just a checkpoint
    of the progress.
    Signed-off-by: default avatarEric Myhre <hash@exultant.us>
    cd9283dd
traverse_test.go 4.81 KB