mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-04 12:47:57 +08:00
Synchronization code
This commit is contained in:
parent
a21114d580
commit
e183cc607b
@ -47,6 +47,13 @@ namespace SqlSugar
|
|||||||
ISqlSugarClient db;
|
ISqlSugarClient db;
|
||||||
List<SugarParameter> pars;
|
List<SugarParameter> pars;
|
||||||
string where;
|
string where;
|
||||||
|
var isAutoDelFilter =
|
||||||
|
DeleteBuilder.Context?.CurrentConnectionConfig?.MoreSettings?.IsAutoDeleteQueryFilter == true &&
|
||||||
|
DeleteBuilder.Context?.CurrentConnectionConfig?.MoreSettings?.IsAutoUpdateQueryFilter == true;
|
||||||
|
if (isAutoDelFilter)
|
||||||
|
{
|
||||||
|
DeleteBuilder.Context.CurrentConnectionConfig.MoreSettings.IsAutoUpdateQueryFilter = false;
|
||||||
|
}
|
||||||
LogicFieldName = _ExecuteCommand(LogicFieldName, out db, out where, out pars);
|
LogicFieldName = _ExecuteCommand(LogicFieldName, out db, out where, out pars);
|
||||||
var updateable = db.Updateable<T>();
|
var updateable = db.Updateable<T>();
|
||||||
updateable.UpdateBuilder.LambdaExpressions.ParameterIndex = 1000;
|
updateable.UpdateBuilder.LambdaExpressions.ParameterIndex = 1000;
|
||||||
@ -64,6 +71,13 @@ namespace SqlSugar
|
|||||||
ISqlSugarClient db;
|
ISqlSugarClient db;
|
||||||
List<SugarParameter> pars;
|
List<SugarParameter> pars;
|
||||||
string where;
|
string where;
|
||||||
|
var isAutoDelFilter =
|
||||||
|
DeleteBuilder.Context?.CurrentConnectionConfig?.MoreSettings?.IsAutoDeleteQueryFilter == true &&
|
||||||
|
DeleteBuilder.Context?.CurrentConnectionConfig?.MoreSettings?.IsAutoUpdateQueryFilter == true;
|
||||||
|
if (isAutoDelFilter)
|
||||||
|
{
|
||||||
|
DeleteBuilder.Context.CurrentConnectionConfig.MoreSettings.IsAutoUpdateQueryFilter = false;
|
||||||
|
}
|
||||||
LogicFieldName = _ExecuteCommand(LogicFieldName, out db, out where, out pars);
|
LogicFieldName = _ExecuteCommand(LogicFieldName, out db, out where, out pars);
|
||||||
var updateable = db.Updateable<T>();
|
var updateable = db.Updateable<T>();
|
||||||
updateable.UpdateBuilder.LambdaExpressions.ParameterIndex = 1000;
|
updateable.UpdateBuilder.LambdaExpressions.ParameterIndex = 1000;
|
||||||
|
@ -223,6 +223,10 @@ namespace SqlSugar
|
|||||||
if (IsTrakingData())
|
if (IsTrakingData())
|
||||||
{
|
{
|
||||||
var trackingData = this.Context.TempItems.FirstOrDefault(it => it.Key.StartsWith("Tracking_" + item.GetHashCode()));
|
var trackingData = this.Context.TempItems.FirstOrDefault(it => it.Key.StartsWith("Tracking_" + item.GetHashCode()));
|
||||||
|
if (trackingData.Key == null && trackingData.Value == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
var diffColumns = FastCopy.GetDiff(item, (T)trackingData.Value);
|
var diffColumns = FastCopy.GetDiff(item, (T)trackingData.Value);
|
||||||
if (diffColumns.Count > 0)
|
if (diffColumns.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,8 @@ namespace SqlSugar
|
|||||||
public DateTime? DbMinDate { get; set; } = Convert.ToDateTime("1900-01-01");
|
public DateTime? DbMinDate { get; set; } = Convert.ToDateTime("1900-01-01");
|
||||||
public bool IsNoReadXmlDescription { get; set; }
|
public bool IsNoReadXmlDescription { get; set; }
|
||||||
public bool SqlServerCodeFirstNvarchar { get; set; }
|
public bool SqlServerCodeFirstNvarchar { get; set; }
|
||||||
|
public bool SqliteCodeFirstEnableDefaultValue { get; set; }
|
||||||
|
public bool SqliteCodeFirstEnableDescription { get; set; }
|
||||||
public bool IsAutoUpdateQueryFilter { get; set; }
|
public bool IsAutoUpdateQueryFilter { get; set; }
|
||||||
public bool IsAutoDeleteQueryFilter { get; set; }
|
public bool IsAutoDeleteQueryFilter { get; set; }
|
||||||
public bool EnableModelFuncMappingColumn { get; set; }
|
public bool EnableModelFuncMappingColumn { get; set; }
|
||||||
|
@ -485,7 +485,9 @@ namespace SqlSugar
|
|||||||
EnableModelFuncMappingColumn=it.MoreSettings.EnableModelFuncMappingColumn,
|
EnableModelFuncMappingColumn=it.MoreSettings.EnableModelFuncMappingColumn,
|
||||||
EnableOracleIdentity = it.MoreSettings.EnableOracleIdentity,
|
EnableOracleIdentity = it.MoreSettings.EnableOracleIdentity,
|
||||||
IsWithNoLockSubquery=it.MoreSettings.IsWithNoLockSubquery,
|
IsWithNoLockSubquery=it.MoreSettings.IsWithNoLockSubquery,
|
||||||
EnableCodeFirstUpdatePrecision=it.MoreSettings.EnableCodeFirstUpdatePrecision
|
EnableCodeFirstUpdatePrecision=it.MoreSettings.EnableCodeFirstUpdatePrecision,
|
||||||
|
SqliteCodeFirstEnableDefaultValue=it.MoreSettings.SqliteCodeFirstEnableDefaultValue,
|
||||||
|
SqliteCodeFirstEnableDescription=it.MoreSettings.SqliteCodeFirstEnableDescription
|
||||||
|
|
||||||
},
|
},
|
||||||
SqlMiddle = it.SqlMiddle == null ? null : new SqlMiddle
|
SqlMiddle = it.SqlMiddle == null ? null : new SqlMiddle
|
||||||
|
Loading…
Reference in New Issue
Block a user