feat: support get Table VIEW (#244)

* feat: support get Table VIEW

* feat:update github action
This commit is contained in:
vran 2022-06-15 20:00:26 +08:00 committed by GitHub
parent 3f01403bb2
commit 72493ad0aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@ on:
- 'common/**'
- 'core/**'
- 'dao/**'
- 'plugin/**'
- 'meta/**'
- 'gradle/**'
- 'config/**'

View File

@ -38,8 +38,9 @@ public class JdbcTableMetaProvider implements TableMetaProvider {
private List<TableMeta> doSelect(Connection connection, Condition condition) throws SQLException {
List<TableMeta> tableMetas = new ArrayList<>();
String databaseName = condition.getDatabaseName();
String[] tableTypes = {"TABLE", "VIEW"};
ResultSet tablesResult = connection.getMetaData()
.getTables(databaseName, condition.getSchemaName(), null, new String[]{"TABLE"});
.getTables(databaseName, condition.getSchemaName(), null, tableTypes);
try {
while (tablesResult.next()) {
String tableName = tablesResult.getString("TABLE_NAME");