示例#1
0
 public void AddSkipClause(HqlExpression toSkip)
 {
     _skipCount = toSkip;
 }
示例#2
0
        static bool IsNullable(HqlExpression original)
        {
            var hqlDot = original as HqlDot;

            return(hqlDot != null && hqlDot.Children.Last() is HqlIdent);
        }
示例#3
0
 public void AddTakeClause(HqlExpression toTake)
 {
     _takeCount = toTake;
 }
示例#4
0
 public override HqlExpression BuildHql(HqlExpression expression, ReadOnlyCollection <HqlExpression> arguments, HqlTreeBuilder treeBuilder)
 {
     return(treeBuilder.Add(_transformer1.BuildHql(expression, arguments, treeBuilder), _transformer2.BuildHql(expression, arguments, treeBuilder)));
 }
示例#5
0
 public override HqlExpression Convert(HqlTreeBuilder treeBuilder, HqlExpression input)
 {
     return(treeBuilder.Multiply(input, treeBuilder.Constant(_factor)));
 }
示例#6
0
 public abstract HqlExpression Convert(HqlTreeBuilder treeBuilder, HqlExpression input);
示例#7
0
 public static HqlExpression ConvertBooleanToCase(HqlExpression node)
 {
     return(node.ToArithmeticExpression());
 }
        private HqlTreeNode ResolveBooleanEquality(BinaryExpression expression, HqlExpression lhs, HqlExpression rhs, Func <HqlExpression, HqlExpression, HqlTreeNode> applyResultExpressions)
        {
            if (!(lhs is HqlBooleanExpression) && !(rhs is HqlBooleanExpression))
            {
                throw new InvalidOperationException("Invalid operators for ResolveBooleanEquality, this may indicate a bug in NHibernate");
            }

            var leftHqlExpression  = GetExpressionForBooleanEquality(expression.Left, lhs);
            var rightHqlExpression = GetExpressionForBooleanEquality(expression.Right, rhs);

            return(applyResultExpressions(leftHqlExpression, rightHqlExpression));
        }