Add getViewPolicy() to LiteParsedDocumentSource

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Allow each LiteParsedDocumentSource to declare whether it:

      • Does nothing for views,
      • Has a custom callback, or
      • Disallows views

      This should like something like:

      class LiteParsedDocumentSource {
      
          struct DefaultViewPolicy;  // No special handling required.
          using DisallowViewType = StringData;  // Views not supported.
          using ViewPolicyFn = std::function<void(const ViewInfo&)>; // Custom handling
      
         /**
           * Indicates how this stage will interact with a view. LiteParsedDocumentSources that
           * wish to perform custom behavior for views should override this function to return
           * a std::function.
          */
          virtual std::variant<DefaultViewPolicy,
                               ViewPolicyFn,
                               DisallowViewType> getViewPolicy() const {
              return DefaultViewPolicy;
          }
      }
      
      

            Assignee:
            Unassigned
            Reporter:
            Lynne Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: