Update exp to sql

This commit is contained in:
sunkaixuan
2023-08-21 22:35:42 +08:00
parent 654111fdd6
commit 92a2a6dac7

View File

@@ -261,6 +261,14 @@ namespace SqlSugar
.Replace(sqlBuilder.SqlTranslationRight, "\\" + sqlBuilder.SqlTranslationRight)
.Replace("\\\\","\\");
if (!regex.IsMatch(this.whereSql))
{
regex = $@"\{sqlBuilder.SqlTranslationLeft}\w+\{sqlBuilder.SqlTranslationRight}\." + sqlBuilder.GetTranslationColumnName(it.DbColumnName)
.Replace(sqlBuilder.SqlTranslationLeft, "\\" + sqlBuilder.SqlTranslationLeft)
.Replace(sqlBuilder.SqlTranslationRight, "\\" + sqlBuilder.SqlTranslationRight)
.Replace("\\\\", "\\");
}
this.whereSql =Regex.Replace(this.whereSql, regex,
lastShortName + "." + sqlBuilder.GetTranslationColumnName(it.DbColumnName));
}