mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Update core
This commit is contained in:
parent
cf611f6d0b
commit
6cf498b767
@ -102,7 +102,7 @@ namespace SqlSugar
|
||||
new KeyValuePair<string, CSharpDataType>("number",CSharpDataType.Single),
|
||||
new KeyValuePair<string, CSharpDataType>("decimal",CSharpDataType.@decimal),
|
||||
new KeyValuePair<string, CSharpDataType>("decimal",CSharpDataType.Single),
|
||||
|
||||
new KeyValuePair<string, CSharpDataType>("dec",CSharpDataType.@decimal),
|
||||
new KeyValuePair<string, SqlSugar.CSharpDataType>("double precision",CSharpDataType.@double),
|
||||
new KeyValuePair<string, SqlSugar.CSharpDataType>("binary", CSharpDataType.@byteArray),
|
||||
|
||||
|
@ -164,14 +164,18 @@ namespace SqlSugar
|
||||
{
|
||||
colum = table.Columns[i];
|
||||
if (i != 0) sb.Append(",");
|
||||
if (colum.DataType == typeof(string) &&( row[colum].ToString().Contains(",") || row[colum].ToString().Contains("\r")||row[colum].ToString().Contains("\"")))
|
||||
if (colum.DataType == typeof(string) && (row[colum].ToString().Contains(",") || row[colum].ToString().Contains("\r") || row[colum].ToString().Contains("\"")))
|
||||
{
|
||||
sb.Append("\"" + row[colum].ToString().Replace("\"", "\"\"") + "\"");
|
||||
}
|
||||
else if (colum.DataType == typeof(bool))
|
||||
else if (colum.DataType == typeof(bool))
|
||||
{
|
||||
sb.Append(row[colum].ObjToBool() ? 1 : 0);
|
||||
}
|
||||
else if (colum.DataType == UtilConstants.DateType&& row[colum] != null && row[colum] != DBNull.Value)
|
||||
{
|
||||
sb.Append(row[colum].ObjToDate().ToString("yyyy-MM-dd HH:mm:ss.fff"));
|
||||
}
|
||||
else sb.Append(row[colum].ToString());
|
||||
}
|
||||
sb.AppendLine();
|
||||
|
Loading…
Reference in New Issue
Block a user