protected String [ ] getDatabaseSchemaNames ( Database database ) throws SQLException , DatabaseException { List < String > returnList = new ArrayList <> ( ) ; ResultSet schemas = null ; try { schemas = ( ( JdbcConnection ) database . getConnection ( ) ) . getMetaData ( ) . getSchemas ( ) ; while ( schemas . next ( ) ) { returnList . add ( JdbcUtils . getValueForColumn ( schemas , "TABLE_SCHEM" , database ) ) ; } } finally { if ( schemas != null ) { schemas . close ( ) ; } } return returnList . toArray ( new String [ returnList . size ( ) ] ) ; }
Fetches an array of Strings with the schema names in the database .