BooleanComparisonType() public static method

public static BooleanComparisonType ( BooleanComparisonType ctype ) : string
ctype BooleanComparisonType
return string
        internal override string ToString(string indent)
        {
            var sb = new StringBuilder();

            sb.Append(Expression.ToString(indent));
            sb.AppendFormat(" {0} \r\n", TsqlFragmentToString.BooleanComparisonType(ComparisonType));
            sb.Append(Subquery.ToString(indent + " "));

            return(sb.ToString());
        }
Ejemplo n.º 2
0
        public override void Visit(WBooleanComparisonExpression node)
        {
            node.FirstExpr.Accept(this);
            string left = this.dfsStack.Pop();

            node.SecondExpr.Accept(this);
            string right = this.dfsStack.Pop();

            // TODO: Consider to ues ISNULLExpression
            string nodeStr = right == "null"
                ? $"{left} IS {right}"
                : $"{left} {TsqlFragmentToString.BooleanComparisonType(node.ComparisonType)} {right}";

            this.dfsStack.Push(nodeStr);
        }
        internal override string ToString(string indent)
        {
            var sb = new StringBuilder(512);

            sb.Append(FirstExpr.ToString(indent));

            sb.AppendFormat(" {0} ", TsqlFragmentToString.BooleanComparisonType(ComparisonType));

            if (SecondExpr.OneLine())
            {
                sb.Append(SecondExpr.ToString(""));
            }
            else
            {
                sb.Append("\r\n");
                sb.Append(SecondExpr.ToString(indent + "    "));
            }

            return(sb.ToString());
        }
Ejemplo n.º 4
0
        public override void Visit(WBooleanComparisonExpression node)
        {
            node.FirstExpr.Accept(this);
            string left = this.dfsStack.Pop();

            node.SecondExpr.Accept(this);
            string right = this.dfsStack.Pop();

            string nodeStr;

            if (node.ComparisonType == BooleanComparisonType.Equals && right == "null")
            {
                // IS_DEFINED(N_18._isEdgeDoc) = false
                nodeStr = $"IS_DEFINED({left}) = false";
            }
            else
            {
                nodeStr = $"{left} {TsqlFragmentToString.BooleanComparisonType(node.ComparisonType)} {right}";
            }

            this.dfsStack.Push(nodeStr);
        }