Skip to content

Commit 63bff03

Browse files
committed
add type map for geometry, geography
1 parent 0d4effc commit 63bff03

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/SmartCode.Generator/DbTypeConverter/DbTypeMap.xml

+4
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,8 @@
357357
<DbType Name="long" To="int8"/>
358358
<DbType Name="longtext" To="text"/>
359359
<DbType Name="timestamp" To="timestamp"/>
360+
<DbType Name="geometry" To="geometry"/>
361+
<DbType Name="geography" To="geography"/>
360362
</Database>
361363

362364
<Database DbProvider="MySql" Language="PostgreSql">
@@ -376,6 +378,8 @@
376378
<DbType Name="numeric" To="decimal"/>
377379
<DbType Name="float" To="float8"/>
378380
<DbType Name="timestamp" To="timestamp"/>
381+
<DbType Name="geometry" To="geometry"/>
382+
<DbType Name="geography" To="geography"/>
379383
</Database>
380384
<!-- PostgreSql-Language End-->
381385

src/SmartCode.Generator/RazorTemplates/ETL/ToPGBuild.cshtml

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ DataSource:
5353
Name: Extract
5454
Parameters:
5555
DbProvider: @dbSource.DbRepository.DbProviderName
56-
ConnectionString: "@extractConnectionString"
56+
ConnectionString: @extractConnectionString
5757
Query: 'Select * From @table.Name @GetExtractWhere()'
5858
PKColumn: @PKColumn.Name
5959
AutoIncrement: @(PKColumn.AutoIncrement ? "true" : "false")
@@ -77,7 +77,7 @@ Build:
7777
Type: Load
7878
Parameters:
7979
DbProvider: @loadDbProvider
80-
ConnectionString: "@loadConnectionString"
80+
ConnectionString: @loadConnectionString
8181
Table: @loadTable
8282
@switch (extractMode)
8383
{
@@ -109,4 +109,4 @@ Build:
109109
{@(",")}
110110
@Html.NewLine()
111111
}
112-
]
112+
]

0 commit comments

Comments
 (0)