Browse Source

Synchronization code

pull/31/head
sunkaixuan 2 years ago
parent
commit
42505f2f28
  1. 6
      Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs

6
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<Match>())
{
@ -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;
}
/// <summary>
/// if mysql return MySqlParameter[] pars

Loading…
Cancel
Save