Pgsql support geometry

This commit is contained in:
sunkaixuna
2021-11-04 18:59:18 +08:00
parent 0c0da83ef2
commit ad977bc1ee
4 changed files with 6 additions and 2 deletions

View File

@@ -111,7 +111,8 @@ namespace SqlSugar
}
if (columnInfo != null && columnInfo.PropertyInfo.GetSetMethod(true) != null)
{
if (columnInfo.PropertyInfo.PropertyType.IsClass() && columnInfo.PropertyInfo.PropertyType != UtilConstants.ByteArrayType && columnInfo.PropertyInfo.PropertyType != UtilConstants.ObjType)
var isGemo = columnInfo.PropertyInfo?.PropertyType?.FullName=="NetTopologySuite.Geometries.Geometry";
if (!isGemo&&columnInfo.PropertyInfo.PropertyType.IsClass() && columnInfo.PropertyInfo.PropertyType != UtilConstants.ByteArrayType && columnInfo.PropertyInfo.PropertyType != UtilConstants.ObjType)
{
if (this.ReaderKeys.Any(it => it.Equals(fileName, StringComparison.CurrentCultureIgnoreCase)))
{

View File

@@ -116,6 +116,7 @@ namespace SqlSugar
new KeyValuePair<string, CSharpDataType>("bit varying",CSharpDataType.byteArray),
new KeyValuePair<string, CSharpDataType>("varbit",CSharpDataType.@byte),
new KeyValuePair<string, CSharpDataType>("time",CSharpDataType.TimeSpan),
new KeyValuePair<string, CSharpDataType>("public.geometry",CSharpDataType.@object)
};
public override List<string> StringThrow
{

View File

@@ -111,7 +111,8 @@ namespace SqlSugar
}
if (columnInfo != null && columnInfo.PropertyInfo.GetSetMethod(true) != null)
{
if (columnInfo.PropertyInfo.PropertyType.IsClass() && columnInfo.PropertyInfo.PropertyType != UtilConstants.ByteArrayType && columnInfo.PropertyInfo.PropertyType != UtilConstants.ObjType)
var isGemo = columnInfo.PropertyInfo?.PropertyType?.FullName=="NetTopologySuite.Geometries.Geometry";
if (!isGemo&&columnInfo.PropertyInfo.PropertyType.IsClass() && columnInfo.PropertyInfo.PropertyType != UtilConstants.ByteArrayType && columnInfo.PropertyInfo.PropertyType != UtilConstants.ObjType)
{
if (this.ReaderKeys.Any(it => it.Equals(fileName, StringComparison.CurrentCultureIgnoreCase)))
{

View File

@@ -116,6 +116,7 @@ namespace SqlSugar
new KeyValuePair<string, CSharpDataType>("bit varying",CSharpDataType.byteArray),
new KeyValuePair<string, CSharpDataType>("varbit",CSharpDataType.@byte),
new KeyValuePair<string, CSharpDataType>("time",CSharpDataType.TimeSpan),
new KeyValuePair<string, CSharpDataType>("public.geometry",CSharpDataType.@object)
};
public override List<string> StringThrow
{