public void AddSkipClause(HqlExpression toSkip) { _skipCount = toSkip; }
static bool IsNullable(HqlExpression original) { var hqlDot = original as HqlDot; return(hqlDot != null && hqlDot.Children.Last() is HqlIdent); }
public void AddTakeClause(HqlExpression toTake) { _takeCount = toTake; }
public override HqlExpression BuildHql(HqlExpression expression, ReadOnlyCollection <HqlExpression> arguments, HqlTreeBuilder treeBuilder) { return(treeBuilder.Add(_transformer1.BuildHql(expression, arguments, treeBuilder), _transformer2.BuildHql(expression, arguments, treeBuilder))); }
public override HqlExpression Convert(HqlTreeBuilder treeBuilder, HqlExpression input) { return(treeBuilder.Multiply(input, treeBuilder.Constant(_factor))); }
public abstract HqlExpression Convert(HqlTreeBuilder treeBuilder, HqlExpression input);
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)); }