Public static methods in Explain class should take in-arguments as const

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 3.1.2
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • Quint Iteration 3.1.2
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The Explain public API should change as follows:

       class Explain {
       public:
      -    static void explainStages(PlanExecutor* exec,
      +    static void explainStages(const PlanExecutor* exec,
                                     ExplainCommon::Verbosity verbosity,
                                     BSONObjBuilder* out);
      
           static BSONObj statsToBSON(const PlanStageStats& stats,
                                      ExplainCommon::Verbosity verbosity = ExplainCommon::EXEC_STATS);
      
           static void statsToBSON(const PlanStageStats& stats,
                                   BSONObjBuilder* bob,
                                   ExplainCommon::Verbosity verbosity = ExplainCommon::EXEC_STATS);
      
      -    static std::string getPlanSummary(PlanExecutor* exec);
      +    static std::string getPlanSummary(const PlanExecutor* exec);
      
      -    static std::string getPlanSummary(PlanStage* root);
      +    static std::string getPlanSummary(const PlanStage* root);
      
      -    static void getSummaryStats(PlanExecutor* exec, PlanSummaryStats* statsOut);
      +    static void getSummaryStats(const PlanExecutor* exec, PlanSummaryStats* statsOut);
       };
      

            Assignee:
            David Storch
            Reporter:
            J Rassi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: