mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Merge
This commit is contained in:
@@ -197,7 +197,7 @@ namespace SqlSugar.MySqlConnector
|
|||||||
sql = FormatSql(sql);
|
sql = FormatSql(sql);
|
||||||
SetConnectionStart(sql);
|
SetConnectionStart(sql);
|
||||||
if (this.ProcessingEventStartingSQL != null)
|
if (this.ProcessingEventStartingSQL != null)
|
||||||
ExecuteProcessingSQL(ref sql, parameters);
|
ExecuteProcessingSQL(ref sql,ref parameters);
|
||||||
ExecuteBefore(sql, parameters);
|
ExecuteBefore(sql, parameters);
|
||||||
var sqlCommand =await GetCommandAsync(sql, parameters);
|
var sqlCommand =await GetCommandAsync(sql, parameters);
|
||||||
int count;
|
int count;
|
||||||
@@ -238,7 +238,7 @@ namespace SqlSugar.MySqlConnector
|
|||||||
SetConnectionStart(sql);
|
SetConnectionStart(sql);
|
||||||
var isSp = this.CommandType == CommandType.StoredProcedure;
|
var isSp = this.CommandType == CommandType.StoredProcedure;
|
||||||
if (this.ProcessingEventStartingSQL != null)
|
if (this.ProcessingEventStartingSQL != null)
|
||||||
ExecuteProcessingSQL(ref sql, parameters);
|
ExecuteProcessingSQL(ref sql,ref parameters);
|
||||||
ExecuteBefore(sql, parameters);
|
ExecuteBefore(sql, parameters);
|
||||||
var sqlCommand = await GetCommandAsync(sql, parameters);
|
var sqlCommand = await GetCommandAsync(sql, parameters);
|
||||||
DbDataReader sqlDataReader;
|
DbDataReader sqlDataReader;
|
||||||
@@ -274,7 +274,7 @@ namespace SqlSugar.MySqlConnector
|
|||||||
sql = FormatSql(sql);
|
sql = FormatSql(sql);
|
||||||
SetConnectionStart(sql);
|
SetConnectionStart(sql);
|
||||||
if (this.ProcessingEventStartingSQL != null)
|
if (this.ProcessingEventStartingSQL != null)
|
||||||
ExecuteProcessingSQL(ref sql, parameters);
|
ExecuteProcessingSQL(ref sql,ref parameters);
|
||||||
ExecuteBefore(sql, parameters);
|
ExecuteBefore(sql, parameters);
|
||||||
var sqlCommand = await GetCommandAsync(sql, parameters) ;
|
var sqlCommand = await GetCommandAsync(sql, parameters) ;
|
||||||
object scalar;
|
object scalar;
|
||||||
|
@@ -336,7 +336,7 @@ namespace SqlSugar
|
|||||||
sql = FormatSql(sql);
|
sql = FormatSql(sql);
|
||||||
SetConnectionStart(sql);
|
SetConnectionStart(sql);
|
||||||
if (this.ProcessingEventStartingSQL != null)
|
if (this.ProcessingEventStartingSQL != null)
|
||||||
ExecuteProcessingSQL(ref sql, parameters);
|
ExecuteProcessingSQL(ref sql,ref parameters);
|
||||||
ExecuteBefore(sql, parameters);
|
ExecuteBefore(sql, parameters);
|
||||||
IDbCommand sqlCommand = GetCommand(sql, parameters);
|
IDbCommand sqlCommand = GetCommand(sql, parameters);
|
||||||
int count = sqlCommand.ExecuteNonQuery();
|
int count = sqlCommand.ExecuteNonQuery();
|
||||||
@@ -369,7 +369,7 @@ namespace SqlSugar
|
|||||||
SetConnectionStart(sql);
|
SetConnectionStart(sql);
|
||||||
var isSp = this.CommandType == CommandType.StoredProcedure;
|
var isSp = this.CommandType == CommandType.StoredProcedure;
|
||||||
if (this.ProcessingEventStartingSQL != null)
|
if (this.ProcessingEventStartingSQL != null)
|
||||||
ExecuteProcessingSQL(ref sql, parameters);
|
ExecuteProcessingSQL(ref sql,ref parameters);
|
||||||
ExecuteBefore(sql, parameters);
|
ExecuteBefore(sql, parameters);
|
||||||
IDbCommand sqlCommand = GetCommand(sql, parameters);
|
IDbCommand sqlCommand = GetCommand(sql, parameters);
|
||||||
IDataReader sqlDataReader = sqlCommand.ExecuteReader(this.IsAutoClose() ? CommandBehavior.CloseConnection : CommandBehavior.Default);
|
IDataReader sqlDataReader = sqlCommand.ExecuteReader(this.IsAutoClose() ? CommandBehavior.CloseConnection : CommandBehavior.Default);
|
||||||
@@ -400,7 +400,7 @@ namespace SqlSugar
|
|||||||
sql = FormatSql(sql);
|
sql = FormatSql(sql);
|
||||||
SetConnectionStart(sql);
|
SetConnectionStart(sql);
|
||||||
if (this.ProcessingEventStartingSQL != null)
|
if (this.ProcessingEventStartingSQL != null)
|
||||||
ExecuteProcessingSQL(ref sql, parameters);
|
ExecuteProcessingSQL(ref sql,ref parameters);
|
||||||
ExecuteBefore(sql, parameters);
|
ExecuteBefore(sql, parameters);
|
||||||
IDataAdapter dataAdapter = this.GetAdapter();
|
IDataAdapter dataAdapter = this.GetAdapter();
|
||||||
DbCommand sqlCommand = GetCommand(sql, parameters);
|
DbCommand sqlCommand = GetCommand(sql, parameters);
|
||||||
@@ -435,7 +435,7 @@ namespace SqlSugar
|
|||||||
sql = FormatSql(sql);
|
sql = FormatSql(sql);
|
||||||
SetConnectionStart(sql);
|
SetConnectionStart(sql);
|
||||||
if (this.ProcessingEventStartingSQL != null)
|
if (this.ProcessingEventStartingSQL != null)
|
||||||
ExecuteProcessingSQL(ref sql, parameters);
|
ExecuteProcessingSQL(ref sql,ref parameters);
|
||||||
ExecuteBefore(sql, parameters);
|
ExecuteBefore(sql, parameters);
|
||||||
IDbCommand sqlCommand = GetCommand(sql, parameters);
|
IDbCommand sqlCommand = GetCommand(sql, parameters);
|
||||||
object scalar = sqlCommand.ExecuteScalar();
|
object scalar = sqlCommand.ExecuteScalar();
|
||||||
@@ -470,7 +470,7 @@ namespace SqlSugar
|
|||||||
sql = FormatSql(sql);
|
sql = FormatSql(sql);
|
||||||
SetConnectionStart(sql);
|
SetConnectionStart(sql);
|
||||||
if (this.ProcessingEventStartingSQL != null)
|
if (this.ProcessingEventStartingSQL != null)
|
||||||
ExecuteProcessingSQL(ref sql, parameters);
|
ExecuteProcessingSQL(ref sql,ref parameters);
|
||||||
ExecuteBefore(sql, parameters);
|
ExecuteBefore(sql, parameters);
|
||||||
var sqlCommand = GetCommand(sql, parameters);
|
var sqlCommand = GetCommand(sql, parameters);
|
||||||
int count;
|
int count;
|
||||||
@@ -508,7 +508,7 @@ namespace SqlSugar
|
|||||||
SetConnectionStart(sql);
|
SetConnectionStart(sql);
|
||||||
var isSp = this.CommandType == CommandType.StoredProcedure;
|
var isSp = this.CommandType == CommandType.StoredProcedure;
|
||||||
if (this.ProcessingEventStartingSQL != null)
|
if (this.ProcessingEventStartingSQL != null)
|
||||||
ExecuteProcessingSQL(ref sql, parameters);
|
ExecuteProcessingSQL(ref sql,ref parameters);
|
||||||
ExecuteBefore(sql, parameters);
|
ExecuteBefore(sql, parameters);
|
||||||
var sqlCommand = GetCommand(sql, parameters);
|
var sqlCommand = GetCommand(sql, parameters);
|
||||||
DbDataReader sqlDataReader;
|
DbDataReader sqlDataReader;
|
||||||
@@ -544,7 +544,7 @@ namespace SqlSugar
|
|||||||
sql = FormatSql(sql);
|
sql = FormatSql(sql);
|
||||||
SetConnectionStart(sql);
|
SetConnectionStart(sql);
|
||||||
if (this.ProcessingEventStartingSQL != null)
|
if (this.ProcessingEventStartingSQL != null)
|
||||||
ExecuteProcessingSQL(ref sql, parameters);
|
ExecuteProcessingSQL(ref sql,ref parameters);
|
||||||
ExecuteBefore(sql, parameters);
|
ExecuteBefore(sql, parameters);
|
||||||
var sqlCommand = GetCommand(sql, parameters);
|
var sqlCommand = GetCommand(sql, parameters);
|
||||||
object scalar;
|
object scalar;
|
||||||
@@ -1272,7 +1272,7 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ExecuteProcessingSQL(ref string sql, SugarParameter[] parameters)
|
protected void ExecuteProcessingSQL(ref string sql,ref SugarParameter[] parameters)
|
||||||
{
|
{
|
||||||
var result = this.ProcessingEventStartingSQL(sql, parameters);
|
var result = this.ProcessingEventStartingSQL(sql, parameters);
|
||||||
sql = result.Key;
|
sql = result.Key;
|
||||||
|
Reference in New Issue
Block a user