Exemple #1
0
 /// <summary>
 /// <para>A maximized MIN predicate of a subject.</para>
 /// <para>Note that a maximized predicate should be the last predicate in a sentence.</para>
 /// </summary>
 /// <typeparam name="T">The type of the subject.</typeparam>
 /// <param name="node">A subject node.</param>
 /// <param name="top">The top value that will limit the rows.</param>
 /// <param name="maximizedExpression">A maximized expression.</param>
 public static T HavingMin <T>(this T node, long top, OrderingArgument maximizedExpression)
     where T : ISemantic
 {
     ((IPredicate)node).AddPredicate(
         new Predicate((DbNode)(object)node, MaximizationType.Min, true, LogicalOperator.And, maximizedExpression, top));
     return(node);
 }
Exemple #2
0
 /// <summary>
 /// Order the result set of a query by the specified column list. The order in which rows are returned in a result set are not guaranteed unless an ORDER BY clause is specified.
 /// </summary>
 /// <param name="prev">A predecessor object.</param>
 /// <param name="firstColumn">The first column in the column list.</param>
 /// <param name="otherColumns">Other columns in the column list.</param>
 public static OrderByChainer OrderBy(this ISemqToSql prev,
                                      OrderingArgument firstColumn, params OrderingArgument[] otherColumns)
 {
     prev.CheckNullAndThrow(Text.Free.Sentence, Text.Method.OrderBy);
     return(new OrderByChainer((ISemantic)prev,
                               Common.MergeArrays <OrderingArgument>(firstColumn, otherColumns ?? new OrderingArgument[] { null })));
 }
 /// <summary>
 /// Order the result set of a query by the specified column list. The order in which rows are returned in a result set are not guaranteed unless an ORDER BY clause is specified.
 /// </summary>
 /// <param name="prev">A predecessor object.</param>
 /// <param name="firstColumn">The first column in the column list.</param>
 /// <param name="otherColumns">Other columns in the column list.</param>
 public static OrderByChainer OrderBy(this IOrderBy prev,
                                      OrderingArgument firstColumn, params OrderingArgument[] otherColumns)
 {
     return(new OrderByChainer((Chainer)prev,
                               Common.MergeArrays <OrderingArgument>(
                                   firstColumn, otherColumns ?? new OrderingArgument[] { null })));
 }