mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 优化 ISelect.GroupBy 查询,增加 .Value 实现聚合源字段查询,ToList(a => a.Sum(a.Value.Score));
- 增加 Expression string.Concat;
This commit is contained in:
@ -208,6 +208,8 @@ namespace FreeSql.Sqlite {
|
||||
case "IsNullOrEmpty":
|
||||
var arg1 = getExp(exp.Arguments[0]);
|
||||
return $"({arg1} is null or {arg1} = '')";
|
||||
case "Concat":
|
||||
return _common.StringConcat(exp.Arguments.Select(a => getExp(a)).ToArray(), null);
|
||||
}
|
||||
} else {
|
||||
var left = getExp(exp.Object);
|
||||
|
@ -61,7 +61,7 @@ namespace FreeSql.Sqlite {
|
||||
}
|
||||
internal override string QuoteParamterName(string name) => $"@{(_orm.CodeFirst.IsSyncStructureToLower ? name.ToLower() : name)}";
|
||||
internal override string IsNull(string sql, object value) => $"ifnull({sql}, {value})";
|
||||
internal override string StringConcat(string left, string right, Type leftType, Type rightType) => $"{left} || {right}";
|
||||
internal override string StringConcat(string[] objs, Type[] types) => $"{string.Join(" || ", objs)}";
|
||||
internal override string Mod(string left, string right, Type leftType, Type rightType) => $"{left} % {right}";
|
||||
|
||||
internal override string QuoteWriteParamter(Type type, string paramterName) => paramterName;
|
||||
|
Reference in New Issue
Block a user