Change helper signature for indexStats commands

XMLWordPrintableJSON

    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Change the function to something like this:

      DBCollection.prototype.indexStats = function(name, opt) {
          var idx = name;
          var cmd = { indexStats: this.getName() };
          // For backwards compat check if name is an object
          if (typeof(name) == 'object') {
              Object.extend(cmd, name);
              idx = name["index"];
          }
      
          cmd["index"] = idx;
          if (typeof(opt) == 'object') // support arbitrary options here
              Object.extend(cmd, opt);
      
          return this._db.runCommand( cmd );
      }

              Assignee:
              DO NOT USE - Backlog - Platform Team
              Reporter:
              Scott Hernandez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: