From 42505f2f28d5365e7513a2b3e85e40691e17cab5 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 28 Feb 2023 18:29:27 +0800 Subject: [PATCH] Synchronization code --- Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs b/Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs index cb5bb04bc..6b47840b5 100644 --- a/Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs +++ b/Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs @@ -17,7 +17,7 @@ namespace SqlSugar { sql = sql.Replace("+@", "+:"); if (sql.HasValue()&&sql.Contains("@")) { - var exceptionalCaseInfo = Regex.Matches(sql, @"\'[^\=]*?\@.*?\'|[\.,\w]+\@[\.,\w]+ | [\.,\w]+\@[\.,\w]+|[\.,\w]+\@[\.,\w]+ |\d+\@\d|\@\@"); + var exceptionalCaseInfo = Regex.Matches(sql, @"\'[^\=]*?\@.*?\'|[\.,\w]+\@[\.,\w]+ | [\.,\w]+\@[\.,\w]+|[\.,\w]+\@[\.,\w]+ |\d+\@\d|\@\@|\.""\@\w{1,25}"""); if (exceptionalCaseInfo != null) { foreach (var item in exceptionalCaseInfo.Cast()) { @@ -37,7 +37,7 @@ namespace SqlSugar { continue; } - else if (item.Value != null && item.Value.Contains("=") && Regex.IsMatch(item.Value, @"\w+ \@\w+[ ]{0,1}\=[ ]{0,1}\'")) + else if (item.Value != null &&item.Value.Contains("=")&& Regex.IsMatch(item.Value, @"\w+ \@\w+[ ]{0,1}\=[ ]{0,1}\'")) { continue; } @@ -99,7 +99,7 @@ namespace SqlSugar } public override IDataAdapter GetAdapter() { - return new OracleDataAdapter(); + return new MyOracleDataAdapter(); } public override DbCommand GetCommand(string sql, SugarParameter[] parameters) { @@ -155,7 +155,7 @@ namespace SqlSugar }; public override void SetCommandToAdapter(IDataAdapter dataAdapter, DbCommand command) { - ((OracleDataAdapter)dataAdapter).SelectCommand = (OracleCommand)command; + ((MyOracleDataAdapter)dataAdapter).SelectCommand = (OracleCommand)command; } /// /// if mysql return MySqlParameter[] pars