mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-15 20:49:31 +08:00
Add Sqlfunc.AggregateDistinctSum
This commit is contained in:
parent
5efe2e1ba8
commit
97f2fddb15
@ -426,6 +426,11 @@ namespace SqlSugar
|
||||
var parameter = model.Args[0];
|
||||
return string.Format("COUNT(DISTINCT {0} )", parameter.MemberName);
|
||||
}
|
||||
public virtual string AggregateDistinctSum(MethodCallExpressionModel model)
|
||||
{
|
||||
var parameter = model.Args[0];
|
||||
return string.Format("SUM(DISTINCT {0} )", parameter.MemberName);
|
||||
}
|
||||
|
||||
public virtual string MappingColumn(MethodCallExpressionModel model)
|
||||
{
|
||||
|
@ -54,6 +54,7 @@ namespace SqlSugar
|
||||
string AggregateMax(MethodCallExpressionModel model);
|
||||
string AggregateCount(MethodCallExpressionModel model);
|
||||
string AggregateDistinctCount(MethodCallExpressionModel model);
|
||||
string AggregateDistinctSum(MethodCallExpressionModel model);
|
||||
string MappingColumn(MethodCallExpressionModel model);
|
||||
string IsNull(MethodCallExpressionModel model);
|
||||
string GetSelfAndAutoFill(string shortName,bool isSingle);
|
||||
|
@ -360,6 +360,7 @@ namespace SqlSugar
|
||||
public static TResult AggregateMax<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static int AggregateCount<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static int AggregateDistinctCount<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static int AggregateDistinctSum<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static TResult MappingColumn<TResult>(TResult type,string newColumnName) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static TResult MappingColumn<TResult>(string newColumnName) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user