Exemplo n.º 1
0
        internal override void AppendMDX(StringBuilder mdx, Formatter f, int indent, bool comma)
        {
            bool flag = false;

            if (this.m_UpstreamOp != null)
            {
                int precedence = GetPrecedence(this.m_UpstreamOp);
                int num2       = GetPrecedence(this.m_Op);
                if ((precedence < 0) || (num2 < 0))
                {
                    flag = true;
                }
                else
                {
                    flag = precedence > num2;
                }
            }
            if (flag || comma)
            {
                f.AppendIndent(mdx, indent, comma);
            }
            MDXExpListNode exps = new MDXExpListNode();

            this.FlattenCJ(exps);
            if (exps.Count > 2)
            {
                bool flag2 = true;
                foreach (MDXExpNode node2 in exps)
                {
                    if (!flag2)
                    {
                        mdx.Append("*");
                    }
                    node2.AppendMDX(mdx, f, f.Indent(indent));
                    flag2 = false;
                }
            }
            else
            {
                string str  = (this.m_Op.Length > 2) ? f.Keyword(this.m_Op) : this.m_Op;
                string mDX  = this.m_Exp1.GetMDX(f, -1);
                string str3 = this.m_Exp2.GetMDX(f, -1);
                if ((indent >= 0) && ((mDX.Length + str3.Length) > 70))
                {
                    if (flag)
                    {
                        mdx.Append("(");
                    }
                    this.m_Exp1.AppendMDX(mdx, f, f.Indent(indent));
                    base.AppendCommentAndIndent(mdx, f, indent, false);
                    mdx.AppendFormat("{0} ", str);
                    this.m_Exp2.AppendMDX(mdx, f, f.Indent(indent));
                    if (flag)
                    {
                        f.AppendIndent(mdx, indent);
                        mdx.Append(")");
                    }
                }
                else
                {
                    base.AppendCommentAndIndent(mdx, f, indent, false);
                    if (flag)
                    {
                        mdx.AppendFormat("({0} {1} {2})", mDX, str, str3);
                    }
                    else
                    {
                        mdx.AppendFormat("{0} {1} {2}", mDX, str, str3);
                    }
                }
            }
        }
Exemplo n.º 2
0
 internal void AppendCommentAndIndent(StringBuilder sb, Formatter f, int indent, bool comma)
 {
     this.AppendComment(sb, f, indent);
     f.AppendIndent(sb, indent, comma);
 }
Exemplo n.º 3
0
 internal override void AppendMDX(StringBuilder mdx, Formatter f, int indent, bool comma)
 {
     f.AppendIndent(mdx, indent, comma);
     mdx.Append(f.Keyword(this.m_Flag.ToUpper()));
 }
Exemplo n.º 4
0
 internal override void AppendMDX(StringBuilder mdx, Formatter f, int indent, bool comma)
 {
     f.AppendIndent(mdx, indent, comma);
     mdx.AppendFormat("CREATE SUBCUBE {0} AS ", this.m_Name);
     this.m_Select.AppendMDX(mdx, f, f.Indent(indent));
 }
Exemplo n.º 5
0
 internal override void AppendMDX(StringBuilder mdx, Formatter f, int indent, bool comma)
 {
     f.AppendIndent(mdx, indent, comma);
     mdx.Append("NON EMPTY ");
     this.m_Set.AppendMDX(mdx, f, f.Indent(indent));
 }
Exemplo n.º 6
0
 internal override void AppendMDX(StringBuilder mdx, Formatter f, int indent, bool comma)
 {
     f.AppendIndent(mdx, indent, comma);
     mdx.Append("GO");
 }