mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 04:35:29 +08:00
Update 达梦
This commit is contained in:
parent
3982a50f96
commit
17cf4f584e
@ -54,18 +54,25 @@ namespace SqlSugar
|
||||
}
|
||||
public partial class DmMethod : DefaultDbMethod, IDbMethods
|
||||
{
|
||||
|
||||
public override string WeekOfYear(MethodCallExpressionModel mode)
|
||||
{
|
||||
var parameterNameA = mode.Args[0].MemberName;
|
||||
return $"TO_NUMBER(TO_CHAR({parameterNameA}, 'WW')) ";
|
||||
}
|
||||
public override string ParameterKeyWord { get; set; } = ":";
|
||||
public string ForXmlPathLast;
|
||||
public override string GetForXmlPath()
|
||||
{
|
||||
return " GROUP BY "+ ForXmlPathLast;
|
||||
}
|
||||
public override string GetStringJoinSelector(string result, string separator)
|
||||
{
|
||||
if (result.ObjToString().Trim().StartsWith("DISTINCT ", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
int index = result.IndexOf(result, StringComparison.Ordinal); // 找到去掉前缀空格后的位置
|
||||
result = result.Substring(index + 9); // 9 是 "DISTINCT " 的长度
|
||||
ForXmlPathLast = result;
|
||||
return $"listagg(to_char(max({result})),'{separator}') within group(order by max({result})) ";
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user