提交 b5b92017 authored 作者: Thomas Mueller's avatar Thomas Mueller

Pull request #2: Add external metadata type support

上级 16325f3d
...@@ -20,7 +20,8 @@ Change Log ...@@ -20,7 +20,8 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>MS SQL Server: the CONVERT method did not work in views <ul><li>Pull request #2: Add external metadata type support (table type "external")
</li><li>MS SQL Server: the CONVERT method did not work in views
and derrived tables. and derrived tables.
</li><li>Java 8 compatibility for "regexp_replace". </li><li>Java 8 compatibility for "regexp_replace".
</li></ul> </li></ul>
......
...@@ -769,10 +769,8 @@ public class JdbcDatabaseMetaData extends TraceObject implements ...@@ -769,10 +769,8 @@ public class JdbcDatabaseMetaData extends TraceObject implements
} }
/** /**
* Gets the list of table types. This call returns a result set with three * Gets the list of table types. This call returns a result set with five
* records: "SYSTEM TABLE", "TABLE", "and "VIEW". * records: "SYSTEM TABLE", "TABLE", "VIEW", "TABLE LINK" and "EXTERNAL".
* The result set is sorted by TABLE_TYPE.
*
* <ul> * <ul>
* <li>1 TABLE_TYPE (String) table type * <li>1 TABLE_TYPE (String) table type
* </li></ul> * </li></ul>
......
...@@ -893,6 +893,7 @@ public class MetaTable extends Table { ...@@ -893,6 +893,7 @@ public class MetaTable extends Table {
add(rows, Table.TABLE_LINK); add(rows, Table.TABLE_LINK);
add(rows, Table.SYSTEM_TABLE); add(rows, Table.SYSTEM_TABLE);
add(rows, Table.VIEW); add(rows, Table.VIEW);
add(rows, Table.EXTERNAL_TABLE_ENGINE);
break; break;
} }
case CATALOGS: { case CATALOGS: {
......
...@@ -943,7 +943,8 @@ public class TestMetaData extends TestBase { ...@@ -943,7 +943,8 @@ public class TestMetaData extends TestBase {
rs = meta.getTableTypes(); rs = meta.getTableTypes();
assertResultSetMeta(rs, 1, new String[] { "TABLE_TYPE" }, assertResultSetMeta(rs, 1, new String[] { "TABLE_TYPE" },
new int[] { Types.VARCHAR }, null, null); new int[] { Types.VARCHAR }, null, null);
assertResultSetOrdered(rs, new String[][] { { "SYSTEM TABLE" }, assertResultSetOrdered(rs, new String[][] {
{ "EXTERNAL" }, { "SYSTEM TABLE" },
{ "TABLE" }, { "TABLE LINK" }, { "VIEW" } }); { "TABLE" }, { "TABLE LINK" }, { "VIEW" } });
rs = meta.getTypeInfo(); rs = meta.getTypeInfo();
...@@ -1019,6 +1020,8 @@ public class TestMetaData extends TestBase { ...@@ -1019,6 +1020,8 @@ public class TestMetaData extends TestBase {
rs = meta.getTableTypes(); rs = meta.getTableTypes();
rs.next(); rs.next();
assertEquals("EXTERNAL", rs.getString("TABLE_TYPE"));
rs.next();
assertEquals("SYSTEM TABLE", rs.getString("TABLE_TYPE")); assertEquals("SYSTEM TABLE", rs.getString("TABLE_TYPE"));
rs.next(); rs.next();
assertEquals("TABLE", rs.getString("TABLE_TYPE")); assertEquals("TABLE", rs.getString("TABLE_TYPE"));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论