Esempio n. 1
0
 /// <summary>
 /// PIVOT rotates a table-valued expression by turning the unique values from one column in the expression into multiple columns in the output, and performs aggregations where they are required on any remaining column values that are wanted in the final output.
 /// </summary>
 /// <param name="prev">A predecessor object.</param>
 /// <param name="aggregateValueColumn">Is a specified Sys aggregation method that takes a column whose values are to be aggregated and stored into rotated columns.</param>
 /// <param name="rotatingColumn">Is a rotating column whose values will become the rotated column names in the pivot table.</param>
 /// <param name="firstRotatedColumn">The first rotated column in the pivot table.</param>
 /// <param name="otherRotatedColumns">Other rotated columns in the pivot table.</param>
 public static PivotChainer Pivot(this IPivot prev,
                                  SysFn aggregateValueColumn,
                                  NonSelectColumnArgument rotatingColumn,
                                  string firstRotatedColumn, params string[] otherRotatedColumns)
 {
     return(new PivotChainer((Chainer)prev, aggregateValueColumn, rotatingColumn,
                             Common.MergeArrays <string>(firstRotatedColumn, otherRotatedColumns)));
 }
Esempio n. 2
0
 /// <summary>
 /// Represents a column in the select statement.
 /// </summary>
 /// <param name="arg">Is a built-in SQL function.</param>
 public Column(SysFn arg)
     : this(arg as Chainer)
 {
     SetArgType(arg);
 }
Esempio n. 3
0
 internal ScalarArgument(SysFn arg)
     : this(arg as Chainer)
 {
     SetArgType(arg);
 }
Esempio n. 4
0
 internal VariableArgument(SysFn arg)
     : this(arg as Chainer)
 {
     SetArgType(arg);
 }
Esempio n. 5
0
 internal FunctionArgument(SysFn arg)
     : this(arg as Chainer)
 {
     SetArgType(arg);
 }
Esempio n. 6
0
 internal AggregateArgument(SysFn arg)
     : this(arg as Chainer)
 {
     SetArgType(arg);
 }
Esempio n. 7
0
 internal OrderingArgument(SysFn arg)
     : this(arg as Chainer)
 {
     SetArgType(arg);
 }
Esempio n. 8
0
 /// <summary>
 /// Specifies that the values in the specified column should be sorted in ascending order. ASC is the default sort order. Null values are treated as the lowest possible values.
 /// </summary>
 /// <param name="column">Is a column expression of a built-in system function on which to sort the query result set.</param>
 public static OrderedChainer AsAsc(this SysFn column)
 {
     return(new OrderedChainer(column, SortOrder.Asc));
 }
Esempio n. 9
0
 internal ValueScalarArgument(SysFn arg)
     : base(arg)
 {
 }
Esempio n. 10
0
 internal NumericArgument(SysFn arg)
     : this(arg as Chainer)
 {
     SetArgType(arg);
 }
Esempio n. 11
0
 /// <summary>
 /// Defines the column collation.
 /// </summary>
 /// <param name="column">A column.</param>
 /// <param name="collation">A collaction name.</param>
 public static CollateChainer Collate(this SysFn column, string collation = "DATABASE_DEFAULT")
 {
     return(new CollateChainer(column, collation));
 }