Skip to content

Commit

Permalink
updated default escape
Browse files Browse the repository at this point in the history
  • Loading branch information
llsand committed Apr 30, 2019
1 parent c48f58f commit 682cf82
Showing 1 changed file with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,31 @@
<apply-templates select="with_time_zone" />
<apply-templates select="object_type" />
<apply-templates select="identity" />
<apply-templates select="default_value" />
<if test="default_value">
<variable name="quote">
<choose>
<when test="contains(default_value, '&quot;')">
<text>'</text>
</when>
<otherwise>
<text>"</text>
</otherwise>
</choose>
</variable>
<choose>
<when test="virtual">
<text> as (</text><value-of select="$quote"/>
<apply-templates select="default_value" />
<value-of select="$quote"/><text>) </text>
<apply-templates select="virtual" />
</when>
<otherwise>
<text> default </text><value-of select="$quote"/>
<apply-templates select="default_value" />
<value-of select="$quote"/>
</otherwise>
</choose>
</if>
<apply-templates select="notnull" />
<if test="position() != last()">
<text>,</text>
Expand Down

0 comments on commit 682cf82

Please sign in to comment.