/// <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 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 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)); }
/// <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)); }
/// <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)); }
/// <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; }
/// <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); }