Skip to content

Commit

Permalink
u code template
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang committed Sep 28, 2017
1 parent 991d732 commit d40e673
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Docs/Codematic.Template/SmartSqlMapForMS-SQL.cmt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<SmartSqlMap Scope="<#= host.GetModelClass(host.TableName) #>" xmlns="http://SmartSql.net/schemas/SmartSqlMap.xsd">
<Statements>
<Statement Id="QueryParams">

<Where>

</Where>
</Statement>
<!--新增-->
<Statement Id="Insert">
Expand Down
6 changes: 4 additions & 2 deletions Docs/Codematic.Template/SmartSqlMapForMySql.cmt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<SmartSqlMap Scope="<#= host.GetModelClass(host.TableName) #>" xmlns="http://SmartSql.net/schemas/SmartSqlMap.xsd">
<Statements>
<Statement Id="QueryParams">
<Where>

</Where>
</Statement>


Expand Down Expand Up @@ -47,7 +49,7 @@
</IsProperty>
<# }#>
</Dynamic>
Where <#= host.Keys[0].ColumnName #>=@<#= host.Keys[0].ColumnName #>
Where <#= host.Keys[0].ColumnName #>=?<#= host.Keys[0].ColumnName #>
</Statement>

<!--获取数据列-->
Expand Down Expand Up @@ -84,7 +86,7 @@

<!--是否存在该记录-->
<Statement Id="IsExist">
Select Count(1) From <#= host.GetModelClass(host.TableName) #> T
Select Count(*) From <#= host.GetModelClass(host.TableName) #> T
<Include RefId="QueryParams"/>
</Statement>

Expand Down

0 comments on commit d40e673

Please sign in to comment.