Browse Source

Synchronization code

pull/40/head
sunkaixuan 1 year ago
parent
commit
1ba4d73063
  1. 4
      Src/Asp.NetCore2/SqlSugar/Realization/Sqlite/SqlBuilder/SqliteExpressionContext.cs

4
Src/Asp.NetCore2/SqlSugar/Realization/Sqlite/SqlBuilder/SqliteExpressionContext.cs

@ -288,14 +288,14 @@ namespace SqlSugar
{
var parameterNameA = mode.Args[0].MemberName;
var parameterNameB = mode.Args[1].MemberName;
return $" RTRIM(REPLACE({parameterNameA}, {parameterNameB}, '')) ";
return $" CASE WHEN SUBSTR({parameterNameA}, -1) = {parameterNameB} THEN SUBSTR({parameterNameA}, 1, LENGTH({parameterNameA}) - 1) ELSE {parameterNameA} END ";
}
public override string TrimStart(MethodCallExpressionModel mode)
{
var parameterNameA = mode.Args[0].MemberName;
var parameterNameB = mode.Args[1].MemberName;
return $" LTRIM(REPLACE({parameterNameA}, {parameterNameB}, '')) ";
return $" CASE WHEN SUBSTR({parameterNameA}, 1, 1) ={parameterNameB} THEN SUBSTR({parameterNameA}, 2) ELSE {parameterNameA} END ";
}
}
}

Loading…
Cancel
Save