List<CachedRow> viewsMetadataRs = null;
try {
viewsMetadataRs = ((JdbcDatabaseSnapshot) snapshot).getMetaData().getViews(((AbstractJdbcDatabase) database).getJdbcCatalogName(schema), ((AbstractJdbcDatabase) database).getJdbcSchemaName(schema), example.getName());
if (viewsMetadataRs.size() > 0) {
CachedRow row = viewsMetadataRs.get(0);
String rawViewName = row.getString("TABLE_NAME");
String rawSchemaName = StringUtils.trimToNull(row.getString("TABLE_SCHEM"));
String rawCatalogName = StringUtils.trimToNull(row.getString("TABLE_CAT"));
String remarks = row.getString("REMARKS");
if (remarks != null) {
remarks = remarks.replace("''", "'"); //come back escaped sometimes
}
View view = new View().setName(cleanNameFromDatabase(rawViewName, database));