True() public method

public True ( ) : HqlTrue
return HqlTrue
Ejemplo n.º 1
0
        internal static HqlExpression ToArithmeticExpression(this HqlTreeNode node)
        {
            var hqlBooleanExpression = node as HqlBooleanExpression;

            if (hqlBooleanExpression != null)
            {
                var builder = new HqlTreeBuilder();

                return(builder.Case(new[] { builder.When(hqlBooleanExpression, builder.True()) }, builder.False()));
            }

            return((HqlExpression)node);
        }
Ejemplo n.º 2
0
		public static HqlExpression ConvertBooleanToCase(HqlExpression node)
		{
			if (node is HqlBooleanExpression)
			{
				var builder = new HqlTreeBuilder();

				return builder.Case(
					new[] {builder.When(node, builder.True())},
					builder.False());
			}

			return node;
		}
Ejemplo n.º 3
0
        public static HqlBooleanExpression ToBooleanExpression(this HqlTreeNode node)
        {
            var hqlDot = node as HqlDot;

            if (hqlDot != null)
            {
                return(new HqlBooleanDot(hqlDot.Factory, hqlDot));
            }
            var hqlBooleanExpression = node as HqlBooleanExpression;

            if (hqlBooleanExpression != null)
            {
                return(hqlBooleanExpression);
            }

            var builder = new HqlTreeBuilder();

            return(builder.Equality(node.AsExpression(), builder.True()));
        }