mirror of
				https://gitee.com/dotnetchina/SqlSugar.git
				synced 2025-10-26 18:59:17 +08:00 
			
		
		
		
	Update Oracle
This commit is contained in:
		| @@ -351,13 +351,13 @@ namespace SqlSugar | ||||
|             try | ||||
|             { | ||||
|                 InitParameters(ref sql, parameters); | ||||
|                 if (FormatSql != null) | ||||
|                 if (IsFormat(parameters)) | ||||
|                     sql = FormatSql(sql); | ||||
|                 if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle==true) | ||||
|                 if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true) | ||||
|                     return this.Context.CurrentConnectionConfig.SqlMiddle.ExecuteCommand(sql, parameters); | ||||
|                 SetConnectionStart(sql); | ||||
|                 if (this.ProcessingEventStartingSQL != null) | ||||
|                     ExecuteProcessingSQL(ref sql,ref parameters); | ||||
|                     ExecuteProcessingSQL(ref sql, ref parameters); | ||||
|                 ExecuteBefore(sql, parameters); | ||||
|                 IDbCommand sqlCommand = GetCommand(sql, parameters); | ||||
|                 int count = sqlCommand.ExecuteNonQuery(); | ||||
| @@ -385,7 +385,7 @@ namespace SqlSugar | ||||
|             try | ||||
|             { | ||||
|                 InitParameters(ref sql, parameters); | ||||
|                 if (FormatSql != null) | ||||
|                 if (IsFormat(parameters)) | ||||
|                     sql = FormatSql(sql); | ||||
|                 if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true) | ||||
|                     return this.Context.CurrentConnectionConfig.SqlMiddle.GetDataReader(sql, parameters); | ||||
| @@ -419,7 +419,7 @@ namespace SqlSugar | ||||
|             try | ||||
|             { | ||||
|                 InitParameters(ref sql, parameters); | ||||
|                 if (FormatSql != null) | ||||
|                 if (IsFormat(parameters)) | ||||
|                     sql = FormatSql(sql); | ||||
|                 if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true) | ||||
|                     return this.Context.CurrentConnectionConfig.SqlMiddle.GetDataSetAll(sql, parameters); | ||||
| @@ -456,7 +456,7 @@ namespace SqlSugar | ||||
|             try | ||||
|             { | ||||
|                 InitParameters(ref sql, parameters); | ||||
|                 if (FormatSql != null) | ||||
|                 if (IsFormat(parameters)) | ||||
|                     sql = FormatSql(sql); | ||||
|                 if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true) | ||||
|                     return this.Context.CurrentConnectionConfig.SqlMiddle.GetScalar(sql, parameters); | ||||
| @@ -493,7 +493,7 @@ namespace SqlSugar | ||||
|             { | ||||
|                 Async(); | ||||
|                 InitParameters(ref sql, parameters); | ||||
|                 if (FormatSql != null) | ||||
|                 if (IsFormat(parameters)) | ||||
|                     sql = FormatSql(sql); | ||||
|                 if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true) | ||||
|                     return await this.Context.CurrentConnectionConfig.SqlMiddle.ExecuteCommandAsync(sql, parameters); | ||||
| @@ -532,7 +532,7 @@ namespace SqlSugar | ||||
|             { | ||||
|                 Async(); | ||||
|                 InitParameters(ref sql, parameters); | ||||
|                 if (FormatSql != null) | ||||
|                 if (IsFormat(parameters)) | ||||
|                     sql = FormatSql(sql); | ||||
|                 if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true) | ||||
|                     return await this.Context.CurrentConnectionConfig.SqlMiddle.GetDataReaderAsync(sql, parameters); | ||||
| @@ -571,7 +571,7 @@ namespace SqlSugar | ||||
|             { | ||||
|                 Async(); | ||||
|                 InitParameters(ref sql, parameters); | ||||
|                 if (FormatSql != null) | ||||
|                 if (IsFormat(parameters)) | ||||
|                     sql = FormatSql(sql); | ||||
|                 if (this.Context.CurrentConnectionConfig?.SqlMiddle?.IsSqlMiddle == true) | ||||
|                     return await this.Context.CurrentConnectionConfig.SqlMiddle.GetScalarAsync(sql, parameters); | ||||
| @@ -1440,6 +1440,10 @@ namespace SqlSugar | ||||
|             var result = connectionString1Array.Except(connectionString2Array); | ||||
|             return result.Count() == 0; | ||||
|         } | ||||
|         private bool IsFormat(SugarParameter[] parameters) | ||||
|         { | ||||
|             return FormatSql != null && parameters != null && parameters.Length > 0; | ||||
|         } | ||||
|  | ||||
|         protected void SetConnectionEnd(string sql) | ||||
|         { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 sunkaixuan
					sunkaixuan