docs: function (expr, cb, joinCond) {
              expr = (isUndefined(expr) || isNull(expr) || (Array.isArray(expr) && !expr.length)) ? null : expr;
              if (expr && cb) {
                  return new BooleanExpression(joinCond || "AND", this._filterExpr(expr, null, joinCond), this._filterExpr(cb, null, joinCond));
              } else if (cb) {
                  expr = cb;
              }
              if (isInstanceOf(expr, Expression)) {
                  if (isInstanceOf(expr, NumericExpression, StringExpression)) {
                      throw new QueryError("Invalid SQL Expression type : " + expr);
                  }
                  return expr;
              } else if (Array.isArray(expr)) {
                  if (expr.length) {
                      var first = expr[0];
                      if (isString(first)) {
                          return new PlaceHolderLiteralString(first, expr.slice(1), true);
                      } else if (Expression.isConditionSpecifier(expr)) {
                          return BooleanExpression.fromValuePairs(expr, joinCond);
                      } else {
                          return BooleanExpression.fromArgs([joinCond || "AND"].concat(expr.map(function (e) {
                              return this._filterExpr(e, null, "AND");
                          }, this)));
                      }
                  }
              } else if (isFunction(expr)) {
                  return this._filterExpr(expr.call(sql, sql), null, joinCond);
              } else if (isBoolean(expr)) {
                  return new BooleanExpression("NOOP", expr);
              } else if (isString(expr)) {
                  return this.stringToIdentifier(expr);
              } else if (isInstanceOf(expr, LiteralString)) {
                  return new LiteralString("(" + expr + ")");
              } else if (isHash(expr)) {
                  return BooleanExpression.fromValuePairs(expr, joinCond);
              } else {
                  throw new QueryError("Invalid filter argument");
              }
          }