public void CanConstructFromDetachedCriteria()
        {
            IDetachedImmutableFlowQuery query = DetachedCriteria.For <UserEntity>()
                                                .DetachedFlowQuery();

            Assert.That(query, Is.Not.Null);
        }
Exemple #2
0
 /// <inheritdoc />
 public IFilterableQuery <T> And
 (
     IDetachedImmutableFlowQuery subquery,
     IsEmptyExpression expression
 )
 {
     return(Where(subquery, expression));
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="SubqueryIsExpressionBase"/> class.
 /// </summary>
 /// <param name="query">
 ///     The subquery to be used by the filter.
 /// </param>
 /// <param name="filterFactory">
 ///     The filter factory.
 /// </param>
 protected SubqueryIsExpressionBase
 (
     IDetachedImmutableFlowQuery query,
     Func <string, DetachedCriteria, ICriterion> filterFactory
 )
 {
     FilterFactory = filterFactory;
     Query         = query;
 }
Exemple #4
0
        /// <inheritdoc />
        public IFilterableQuery <T> Where
        (
            IDetachedImmutableFlowQuery subquery,
            IsEmptyExpression expression
        )
        {
            _query.Where(subquery, expression);

            return(this);
        }
Exemple #5
0
 public new IDummyQuery3 Where(IDetachedImmutableFlowQuery subquery, IsEmptyExpression expresson)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 ///     Specifies a Subquery aggregation.
 /// </summary>
 /// <typeparam name="T">
 ///     The return type of the given subquery.
 /// </typeparam>
 /// <param name="subquery">
 ///     The subquery for which the aggregation should apply.
 /// </param>
 /// <returns>
 ///     The aggregated value.
 /// </returns>
 /// <exception cref="InvalidOperationException">
 ///     Will always throw a <see cref="InvalidOperationException" /> if called outside a
 ///     <see cref="System.Linq.Expressions.Expression{Func}" />.
 /// </exception>
 public static T Subquery <T>(IDetachedImmutableFlowQuery subquery)
 {
     throw Exception();
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="IsGreaterThanAllSubqueryExpression" /> class.
 /// </summary>
 /// <param name="query">
 ///     The query.
 /// </param>
 public IsGreaterThanAllSubqueryExpression(IDetachedImmutableFlowQuery query)
     : base(query, Subqueries.PropertyGtAll)
 {
 }
Exemple #8
0
 /// <summary>
 ///     Creates a "is less than some" filter.
 /// </summary>
 /// <param name="query">
 ///     The subquery yielding the result to match.
 /// </param>
 /// <returns>
 ///     The <see cref="IsExpression"/> filter.
 /// </returns>
 public static IsExpression LessThanSome(IDetachedImmutableFlowQuery query)
 {
     return(Positive.LessThanSome(query));
 }
Exemple #9
0
 /// <summary>
 ///     Creates a "is less than or equal to all" filter.
 /// </summary>
 /// <param name="query">
 ///     The subquery yielding the result to match.
 /// </param>
 /// <returns>
 ///     The <see cref="IsExpression"/> filter.
 /// </returns>
 public static IsExpression LessThanOrEqualToAll(IDetachedImmutableFlowQuery query)
 {
     return(Positive.LessThanOrEqualToAll(query));
 }
Exemple #10
0
 /// <summary>
 ///     Creates a "is in" filter.
 /// </summary>
 /// <param name="query">
 ///     The subquery yielding the results to match.
 /// </param>
 /// <returns>
 ///     The <see cref="IsExpression"/> filter.
 /// </returns>
 public static IsExpression In(IDetachedImmutableFlowQuery query)
 {
     return(Positive.In(query));
 }
Exemple #11
0
 /// <summary>
 ///     Creates a "is greater than or equal to some" filter.
 /// </summary>
 /// <param name="query">
 ///     The subquery yielding the result to match.
 /// </param>
 /// <returns>
 ///     The <see cref="IsExpression"/> filter.
 /// </returns>
 public static IsExpression GreaterThanOrEqualToSome(IDetachedImmutableFlowQuery query)
 {
     return(Positive.GreaterThanOrEqualToSome(query));
 }
Exemple #12
0
 /// <summary>
 ///     Creates a "is greater than all" filter.
 /// </summary>
 /// <param name="query">
 ///     The subquery yielding the result to match.
 /// </param>
 /// <returns>
 ///     The <see cref="IsExpression"/> filter.
 /// </returns>
 public static IsExpression GreaterThanAll(IDetachedImmutableFlowQuery query)
 {
     return(Positive.GreaterThanAll(query));
 }
Exemple #13
0
 /// <summary>
 ///     Creates an "is equal to" filter.
 /// </summary>
 /// <param name="query">
 ///     The subquery yielding the result to match.
 /// </param>
 /// <returns>
 ///     The <see cref="IsExpression"/> filter.
 /// </returns>
 public static IsExpression EqualTo(IDetachedImmutableFlowQuery query)
 {
     return(Positive.EqualTo(query));
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="IsLessThanOrEqualToSomeSubqueryExpression" /> class.
 /// </summary>
 /// <param name="query">
 ///     The query.
 /// </param>
 public IsLessThanOrEqualToSomeSubqueryExpression(IDetachedImmutableFlowQuery query)
     : base(query, Subqueries.PropertyLeSome)
 {
 }
Exemple #15
0
 /// <summary>
 ///     Creates an "is in" filter on the specified property.
 /// </summary>
 /// <param name="property">
 ///     The property.
 /// </param>
 /// <param name="query">
 ///     The subquery yielding the results to match.
 /// </param>
 /// <typeparam name="TProperty">
 ///     The <see cref="System.Type" /> of the specified property.
 /// </typeparam>
 /// <returns>
 ///     Nothing, as this method is not to be used directly and will throw an exception in such a case.
 /// </returns>
 /// <exception cref="InvalidOperationException">
 ///     If this method is used directly.
 /// </exception>
 public static bool IsIn <TProperty>(this TProperty property, IDetachedImmutableFlowQuery query)
 {
     throw Exception();
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="IsGreaterThanOrEqualToSubqueryExpression" /> class.
 /// </summary>
 /// <param name="query">
 ///     The query.
 /// </param>
 public IsGreaterThanOrEqualToSubqueryExpression(IDetachedImmutableFlowQuery query)
     : base(query, Subqueries.PropertyGe)
 {
 }