Browse Source

Update oracle

pull/40/head
sunkaixuan 1 year ago
parent
commit
faf1bf17f8
  1. 2
      Src/Asp.NetCore2/SqlSugar/Realization/Oracle/OracleProvider.cs
  2. 4
      Src/Asp.NetCore2/SqlSugar/Utilities/ValidateExtensions.cs

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

@ -129,7 +129,7 @@ namespace SqlSugar
{ {
foreach (var Parameter in parameters.OrderByDescending(x=>x.ParameterName?.Length)) foreach (var Parameter in parameters.OrderByDescending(x=>x.ParameterName?.Length))
{ {
if (Parameter.ParameterName != null && Parameter.ParameterName.ToLower().IsContainsIn(KeyWord)) if (Parameter.ParameterName != null && Parameter.ParameterName.ToLower().IsContainsStartWithIn(KeyWord))
{ {
if (parameters.Count(it => it.ParameterName.StartsWith(Parameter.ParameterName)) == 1) if (parameters.Count(it => it.ParameterName.StartsWith(Parameter.ParameterName)) == 1)
{ {

4
Src/Asp.NetCore2/SqlSugar/Utilities/ValidateExtensions.cs

@ -26,6 +26,10 @@ namespace SqlSugar
{ {
return inValues.Any(it => thisValue.Contains(it)); return inValues.Any(it => thisValue.Contains(it));
} }
public static bool IsContainsStartWithIn(this string thisValue, params string[] inValues)
{
return inValues.Any(it => thisValue.StartsWith(it));
}
public static bool IsNullOrEmpty(this object thisValue) public static bool IsNullOrEmpty(this object thisValue)
{ {

Loading…
Cancel
Save