Browse Source

Synchronization code

pull/30/head
sunkaixuan 2 years ago
parent
commit
8375ae6862
  1. 10
      Src/Asp.NetCore2/SqlSugar/Realization/Dm/DmProvider.cs
  2. 10
      Src/Asp.NetCore2/SqlSugar/Realization/Oracle/OracleProvider.cs

10
Src/Asp.NetCore2/SqlSugar/Realization/Dm/DmProvider.cs

@ -26,15 +26,19 @@ namespace SqlSugar
{
if (item.Value != null && item.Value.IndexOf(",") == 1 && Regex.IsMatch(item.Value, @"^ \,\@\w+$"))
{
break;
continue;
}
else if (item.Value != null && Regex.IsMatch(item.Value.Trim(), @"^\w+\,\@\w+\,$"))
{
break;
continue;
}
else if (item.Value != null && item.Value.ObjToString().Contains("||") && Regex.IsMatch(item.Value.Replace(" ", "").Trim(), @"\|\|@\w+\|\|"))
{
break;
continue;
}
else if (item.Value != null && Regex.IsMatch(item.Value.Replace(" ", "").Trim(), @"\(\@\w+\,"))
{
continue;
}
sql = sql.Replace(item.Value, item.Value.Replace("@", UtilConstants.ReplaceKey));
}

10
Src/Asp.NetCore2/SqlSugar/Realization/Oracle/OracleProvider.cs

@ -23,15 +23,19 @@ namespace SqlSugar
{
if (item.Value != null && item.Value.IndexOf(",") == 1&&Regex.IsMatch(item.Value, @"^ \,\@\w+$"))
{
break;
continue;
}
else if (item.Value != null &&Regex.IsMatch(item.Value.Trim(), @"^\w+\,\@\w+\,$"))
{
break;
continue;
}
else if (item.Value != null && item.Value.ObjToString().Contains("||") && Regex.IsMatch(item.Value.Replace(" ","").Trim(), @"\|\|@\w+\|\|"))
{
break;
continue;
}
else if (item.Value != null&& Regex.IsMatch(item.Value.Replace(" ", "").Trim(), @"\(\@\w+\,"))
{
continue;
}
sql = sql.Replace(item.Value, item.Value.Replace("@", UtilConstants.ReplaceKey));
}

Loading…
Cancel
Save