code: function (addedByBool, groupedByBool) {
              groupedByBool = isUndefined(groupedByBool) ? "AND" : groupedByBool;
              var tOpts = this.__opts,
                  clause = (tOpts.having ? "having" : "where"),
                  clauseObj = tOpts[clause];
              var args = argsToArray(arguments, 2);
              args = args.length === 1 ? args[0] : args;
              var opts = {};
              if (clauseObj) {
                  addedByBool = isUndefined(addedByBool) ? "AND" : addedByBool;
                  opts[clause] = new BooleanExpression(addedByBool, clauseObj, this._filterExpr(args, null, groupedByBool));
              } else {
                  opts[clause] = this._filterExpr(args, null, groupedByBool);
              }
              return this.mergeOptions(opts);
          }
docs: @private
  
  Adds a group of conditions joined by the second arg, wrapped in parens, connected to an existing where/having
  clause by the first arg.
  If the where/having clause doesn't yet exist, a where clause is created with the group.
  
  @example
  
  DB.from("items").filter({id, [1,2,3]})._addGroupedCondition("AND", "OR", [{price: {lt : 0}}, {price: {gt: 10}]).sql;
  //=> SELECT
  *
  FROM
  items
  WHERE
  ((id IN (1, 2, 3)) AND ((price < 0) OR (price > 10)))
  
  DB.from("items")._addGroupedCondition("AND", "OR", [{price: {lt : 0}}, {price: {gt: 10}]).sql;
  //=> SELECT
  *
  FROM
  items
  WHERE
  ((price < 0) OR (price > 10))
  
  @param {String} If there is an existing where/having clause, this arg will join the new condition group to it. "AND" if undef. Should be "AND" or "OR"
  @param {String} The conditions will be joined this. Same expectations as the first param.
  @param See {@link patio.Dataset#filter}.
  
  @return {patio.Dataset} a cloned dataset with the condition group added to the WHERE/HAVING clause.