Skip to content

Commit

Permalink
Merge pull request #69 from tjaeschke/fix-materialized-view-xsl
Browse files Browse the repository at this point in the history
Fix materialized view xsl
  • Loading branch information
llsand authored Jun 6, 2019
2 parents ea79299 + 422a2dc commit 88958a4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Column :
name=DBNAME data_type=DataType ("(" precision=INT ("," scale=INT )? (byteorchar=CharType)? ")" )? (unsigned?="unsigned")? (with_time_zone="with_time_zone")? ("type" object_type=STRING)? ("default" default_value=STRING | "as" "(" default_value=STRING ")" virtual="virtual")? (identity=ColumnIdentity)? (notnull?="not" "null")? (",")?;

enum DataType :
number="number"|blob="blob"|clob="clob"|nclob="nclob"|varchar2="varchar2"|nvarchar2="nvarchar2"|char="char"|date="date"|xmltype="xmltype"|timestamp="timestamp"|rowid="rowid"|raw="raw"|long_raw="long_raw"|float="float"|long="long"|object="object"|tinyint="tinyint"|smallint="smallint"|mediumint="mediumint"|int="int"|bigint="bigint"|bit="bit";
number="number"|blob="blob"|clob="clob"|nclob="nclob"|varchar2="varchar2"|nvarchar2="nvarchar2"|char="char"|date="date"|xmltype="xmltype"|timestamp="timestamp"|rowid="rowid"|raw="raw"|long_raw="long_raw"|float="float"|long="long"|object="object"|tinyint="tinyint"|smallint="smallint"|mediumint="mediumint"|int="int"|bigint="bigint"|bit="bit"|urowid="urowid";

Constraint :
"constraint" consName=DBNAME "check" "(" rule=STRING ")" ("deferrable" "initially" deferrtype=DeferrType)? (status=EnableType)? (",")?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,10 @@ protected void useResultSetRow( ResultSet pResultSet ) throws SQLException
{
lColumn.setData_type( DataType.ROWID );
}
if( "UROWID".equals( pResultSet.getString( "data_type" ) ) )
{
lColumn.setData_type( DataType.UROWID );
}
if( "LONG RAW".equals( pResultSet.getString( "data_type" ) ) )
{
lColumn.setData_type( DataType.LONG_RAW );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,14 @@
<func:result>
<value-of select="java_string:toLowerCase(java_string:new($string_param))" />
</func:result>
</func:function>
</func:function>

<func:function name="myfunc:format-mview-filename">
<param name="string_param" />
<func:result>
<value-of select="java_string:concat('mv_',java_string:toLowerCase(java_string:new($string_param)))" />
</func:result>
</func:function>

<func:function name="myfunc:split-by-linefeed">
<param name="string_param" />
<func:result>
<value-of select="java_string:replaceAll(java_string:new($string_param),'(.{1000})','$1--line.separator--')" />
</func:result>
</func:function>

<func:function name="myfunc:format-dbname">
<param name="string_param" />
Expand Down Expand Up @@ -63,6 +56,13 @@
</func:result>
</func:function>

<func:function name="myfunc:escape-quote">
<param name="string_param" />
<func:result>
<value-of select="java_string:replaceAll(java_string:new($string_param),'\&quot;','\\\&quot;')" />
</func:result>
</func:function>

<func:function name="myfunc:is-number">
<param name="string_param" />
<func:result>
Expand Down Expand Up @@ -909,13 +909,10 @@
</template>

<template match="viewSelectCLOB">
<text> as </text>
<text>"</text>
<value-of select="myfunc:split-by-linefeed(.)" />
<text> as </text>
<text>"</text>
<value-of select="myfunc:escape-quote(.)" />
<text>"</text>
</template>

</stylesheet>



</stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ create table tab_datatypes
col_timestamp_6_timezone timestamp(6) with time zone,
col_timestamp_9_timezone timestamp(9) with time zone,
col_rowid rowid,
col_urowid urowid,
col_raw raw(10),
col_float_2 float(2),
col_float_def float,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ create table tab_datatypes
col_timestamp_6_timezone timestamp(6) with_time_zone,
col_timestamp_9_timezone timestamp(9) with_time_zone,
col_rowid rowid,
col_urowid urowid,
col_raw raw(10),
col_float_2 float(2),
col_float_def float,
Expand Down

0 comments on commit 88958a4

Please sign in to comment.