mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-05 03:17:41 +08:00
Update db.StorageableDataTable
This commit is contained in:
@@ -17,11 +17,22 @@ namespace SqlSugar
|
||||
internal string SugarColumns = "SugarColumns";
|
||||
internal string SugarErrorMessage = "SugarErrorMessage";
|
||||
internal List<DataRow> dbDataList = new List<DataRow>();
|
||||
internal Func<DateTime, string> formatTime;
|
||||
List<KeyValuePair<StorageType, Func<DataRow, bool>,string>> whereFuncs = new List<KeyValuePair<StorageType, Func<DataRow, bool>,string>>();
|
||||
public StorageableDataTable WhereColumns(string name)
|
||||
{
|
||||
return WhereColumns(new string[] { name});
|
||||
}
|
||||
public StorageableDataTable WhereColumns(string name, Func<DateTime, string> formatTime)
|
||||
{
|
||||
this.formatTime = formatTime;
|
||||
return WhereColumns(new string[] { name });
|
||||
}
|
||||
public StorageableDataTable WhereColumns(string [] names, Func<DateTime, string> formatTime)
|
||||
{
|
||||
this.formatTime = formatTime;
|
||||
return WhereColumns(names);
|
||||
}
|
||||
public StorageableDataTable WhereColumns(string[] names)
|
||||
{
|
||||
this.Columns = names;
|
||||
@@ -180,7 +191,7 @@ namespace SqlSugar
|
||||
{
|
||||
FieldName = name,
|
||||
ConditionalType = ConditionalType.Equal,
|
||||
FieldValue = value + "",
|
||||
FieldValue = value.ObjToString(this.formatTime),
|
||||
CSharpTypeName=value?.GetType()?.Name
|
||||
}));
|
||||
++i;
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace SqlSugar
|
||||
}
|
||||
else
|
||||
{
|
||||
return thisValue.ObjToStringNoTrim();
|
||||
return thisValue+string.Empty;
|
||||
}
|
||||
}
|
||||
public static string ObjToString(this object thisValue)
|
||||
|
||||
Reference in New Issue
Block a user