Synchronization code

This commit is contained in:
sunkaixuan 2022-11-14 00:33:00 +08:00
parent 2e94087244
commit 3f39f1c828
4 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ namespace SqlSugar
public virtual string GetDbTypeName(string csharpTypeName)
{
if (csharpTypeName == UtilConstants.ByteArrayType.Name)
return "varbinary";
return "bytea";
if (csharpTypeName.ToLower() == "int32")
csharpTypeName = "int";
if (csharpTypeName.ToLower() == "int16")

View File

@ -764,7 +764,7 @@ namespace SqlSugar
public DataTable ListToDataTable<T>(List<T> list)
{
DataTable result = new DataTable();
if (list.Count > 0)
if (list!=null&&list.Count > 0)
{
PropertyInfo[] propertys = list[0].GetType().GetProperties();
foreach (PropertyInfo pi in propertys)

View File

@ -81,7 +81,7 @@ namespace SqlSugar
new KeyValuePair<string, CSharpDataType>("boolean",CSharpDataType.@bool),
new KeyValuePair<string, CSharpDataType>("bool",CSharpDataType.@bool),
new KeyValuePair<string, CSharpDataType>("box",CSharpDataType.@bool),
new KeyValuePair<string, CSharpDataType>("bytea",CSharpDataType.@bool),
new KeyValuePair<string, CSharpDataType>("bytea",CSharpDataType.byteArray),
new KeyValuePair<string, CSharpDataType>("varchar",CSharpDataType.@string),
new KeyValuePair<string, CSharpDataType>("character varying",CSharpDataType.@string),

View File

@ -62,8 +62,8 @@ namespace SqlSugar
new KeyValuePair<string, CSharpDataType>("smallint",CSharpDataType.@short),
new KeyValuePair<string, CSharpDataType>("tinyint",CSharpDataType.@byte),
new KeyValuePair<string, CSharpDataType>("uniqueidentifier",CSharpDataType.Guid),
new KeyValuePair<string, CSharpDataType>("binary",CSharpDataType.byteArray),
new KeyValuePair<string, CSharpDataType>("image",CSharpDataType.byteArray),
new KeyValuePair<string, CSharpDataType>("binary",CSharpDataType.byteArray),
new KeyValuePair<string, CSharpDataType>("varbinary",CSharpDataType.byteArray),
new KeyValuePair<string, CSharpDataType>("datetimeoffset", CSharpDataType.DateTimeOffset),
new KeyValuePair<string, CSharpDataType>("datetimeoffset", CSharpDataType.DateTime)};