示例#1
0
 /// <summary>
 /// Build a SQL aggregation Expression of average.
 /// </summary>
 /// <param name="expr">Operate expression.</param>
 /// <param name="mode">Select mode, 'ALL' or 'DISTINCT'.</param>
 /// <returns>SQL aggregation Expression of average.</returns>
 public static APSqlAggregationExpr Avg(this APSqlOperateExpr expr, APSqlSelectMode mode)
 {
     return(new APSqlAggregationExpr(expr, APSqlAggregationType.AVG, mode));
 }
示例#2
0
 /// <summary>
 /// Build a SQL aggregation Expression of checksum agg.
 /// </summary>
 /// <param name="expr">Operate expression.</param>
 /// <param name="mode">Select mode, 'ALL' or 'DISTINCT'.</param>
 /// <returns>SQL aggregation Expression of checksum agg.</returns>
 public static APSqlAggregationExpr ChecksumAgg(this APSqlOperateExpr expr, APSqlSelectMode mode)
 {
     return(new APSqlAggregationExpr(expr, APSqlAggregationType.CHECKSUM_AGG, mode));
 }
示例#3
0
 /// <summary>
 /// Build a SQL aggregation Expression of sum.
 /// </summary>
 /// <param name="columnDef">Column definition.</param>
 /// <param name="mode">Select mode, 'ALL' or 'DISTINCT'.</param>
 /// <returns>SQL aggregation Expression of sum.</returns>
 public static APSqlAggregationExpr Sum(this APColumnDef columnDef, APSqlSelectMode mode)
 {
     return(new APSqlAggregationExpr(new APSqlColumnExpr(columnDef), APSqlAggregationType.SUM, mode));
 }
示例#4
0
 /// <summary>
 /// Build a SQL aggregation Expression of count big.
 /// </summary>
 /// <param name="expr">Operate expression.</param>
 /// <param name="mode">Select mode, 'ALL' or 'DISTINCT'.</param>
 /// <returns>SQL aggregation Expression of count big.</returns>
 public static APSqlAggregationExpr CountBig(this APSqlOperateExpr expr, APSqlSelectMode mode)
 {
     return(new APSqlAggregationExpr(expr, APSqlAggregationType.COUNT_BIG, mode));
 }
示例#5
0
 /// <summary>
 /// Build a SQL aggregation Expression of checksum agg.
 /// </summary>
 /// <param name="columnDef">Column definition.</param>
 /// <param name="mode">Select mode, 'ALL' or 'DISTINCT'.</param>
 /// <returns>SQL aggregation Expression of checksum agg.</returns>
 public static APSqlAggregationExpr ChecksumAgg(this APColumnDef columnDef, APSqlSelectMode mode)
 {
     return(new APSqlAggregationExpr(new APSqlColumnExpr(columnDef), APSqlAggregationType.CHECKSUM_AGG, mode));
 }
示例#6
0
 /// <summary>
 /// Build a SQL aggregation Expression of count big.
 /// </summary>
 /// <param name="columnDef">Column definition.</param>
 /// <param name="mode">Select mode, 'ALL' or 'DISTINCT'.</param>
 /// <returns>SQL aggregation Expression of count big.</returns>
 public static APSqlAggregationExpr CountBig(this APColumnDef columnDef, APSqlSelectMode mode)
 {
     return(new APSqlAggregationExpr(new APSqlColumnExpr(columnDef), APSqlAggregationType.COUNT_BIG, mode));
 }
		/// <summary>
		/// Create a new APSqlAggregationExpr.
		/// </summary>
		/// <param name="rowSelectExpr">Row SQL 'SELECT' Expression.</param>
		/// <param name="aggregationType">Aggregation type.</param>
		/// <param name="selectMode">Select mode.</param>
		public APSqlAggregationExpr(APSqlExpr rowSelectExpr, APSqlAggregationType aggregationType, APSqlSelectMode selectMode)
		{
			_rowSelectExpr = rowSelectExpr;
			_aggregationType = aggregationType;
			_selectMode = selectMode;
		}
示例#8
0
 /// <summary>
 /// Create a new APSqlAggregationExpr.
 /// </summary>
 /// <param name="rowSelectExpr">Row SQL 'SELECT' Expression.</param>
 /// <param name="aggregationType">Aggregation type.</param>
 /// <param name="selectMode">Select mode.</param>
 public APSqlAggregationExpr(APSqlExpr rowSelectExpr, APSqlAggregationType aggregationType, APSqlSelectMode selectMode)
 {
     _rowSelectExpr   = rowSelectExpr;
     _aggregationType = aggregationType;
     _selectMode      = selectMode;
 }
		/// <summary>
		/// Build a SQL aggregation Expression of checksum agg.
		/// </summary>
		/// <param name="expr">Operate expression.</param>
		/// <param name="mode">Select mode, 'ALL' or 'DISTINCT'.</param>
		/// <returns>SQL aggregation Expression of checksum agg.</returns>
		public static APSqlAggregationExpr ChecksumAgg(this APSqlOperateExpr expr, APSqlSelectMode mode)
		{
			return new APSqlAggregationExpr(expr, APSqlAggregationType.CHECKSUM_AGG, mode);
		}
		/// <summary>
		/// Build a SQL aggregation Expression of average.
		/// </summary>
		/// <param name="expr">Operate expression.</param>
		/// <param name="mode">Select mode, 'ALL' or 'DISTINCT'.</param>
		/// <returns>SQL aggregation Expression of average.</returns>
		public static APSqlAggregationExpr Avg(this APSqlOperateExpr expr, APSqlSelectMode mode)
		{
			return new APSqlAggregationExpr(expr, APSqlAggregationType.AVG, mode);
		}
		/// <summary>
		/// Build a SQL aggregation Expression of count big.
		/// </summary>
		/// <param name="expr">Operate expression.</param>
		/// <param name="mode">Select mode, 'ALL' or 'DISTINCT'.</param>
		/// <returns>SQL aggregation Expression of count big.</returns>
		public static APSqlAggregationExpr CountBig(this APSqlOperateExpr expr, APSqlSelectMode mode)
		{
			return new APSqlAggregationExpr(expr, APSqlAggregationType.COUNT_BIG, mode);
		}