BooleanNot() 공개 메소드

public BooleanNot ( HqlBooleanExpression operand ) : HqlBooleanNot
operand HqlBooleanExpression
리턴 HqlBooleanNot
예제 #1
0
        public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject, ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor)
        {
            HqlExpression value = visitor.Visit(arguments[0]).AsExpression();
            HqlTreeNode inClauseNode = BuildInClause(arguments, treeBuilder, visitor);

            HqlTreeNode inClause = treeBuilder.In(value, inClauseNode);

            if (method.Name == "NotIn")
                inClause = treeBuilder.BooleanNot((HqlBooleanExpression)inClause);

            return inClause;
        }
예제 #2
0
		public override HqlTreeNode BuildHql(MethodInfo method, Expression targetObject, ReadOnlyCollection<Expression> arguments, HqlTreeBuilder treeBuilder, IHqlExpressionVisitor visitor)
		{
			// All has two arguments.  Arg 1 is the source and arg 2 is the predicate
			var predicate = (LambdaExpression) arguments[1];

			return treeBuilder.BooleanNot(
				treeBuilder.Exists(
					treeBuilder.Query(
						treeBuilder.SelectFrom(
							treeBuilder.From(
								treeBuilder.Range(
									visitor.Visit(arguments[0]),
									treeBuilder.Alias(predicate.Parameters[0].Name))
								)
							),
						treeBuilder.Where(
							treeBuilder.BooleanNot(visitor.Visit(arguments[1]).AsBooleanExpression())
							)
						)
					)
				);
		}