@ -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 " ;
}
}
}