platform.readModelFromDatabase(null, getCatalogPattern(), getSchemaPattern(), null) : platform.readModelFromDatabase(null);
platform.readModelFromDatabase("unnamed", getCatalogPattern(), getSchemaPattern(), null) : platform.readModelFromDatabase("unnamed");
    public void execute(Task task, Database model) throws BuildException    {        if (_outputFile == null)        {            throw new BuildException("No output file specified");        }        if (_outputFile.exists() && !_outputFile.canWrite())        {            throw new BuildException("Cannot overwrite output file "+_outputFile.getAbsolutePath());        }        Platform           platform        = getPlatform();        boolean            isCaseSensitive = platform.isDelimitedIdentifierModeOn();        CreationParameters params          = getFilteredParameters(model, platform.getName(), isCaseSensitive);        try        {            FileWriter writer = new FileWriter(_outputFile);            platform.setScriptModeOn(true);            if (platform.getPlatformInfo().isSqlCommentsSupported())            {                // we're generating SQL comments if possible                platform.setSqlCommentsOn(true);            }            platform.getSqlBuilder().setWriter(writer);            boolean shouldAlter = isAlterDatabase();            if (shouldAlter)            {                if (getDataSource() == null)                {                    shouldAlter = false;                    _log.warn("Cannot alter the database because no database connection was specified." +                              " SQL for database creation will be generated instead.");                }                else                {                    try                    {                        Connection connection = getDataSource().getConnection();                        connection.close();                    }                    catch (SQLException ex)                    {                        shouldAlter = false;                        _log.warn("Could not establish a connection to the specified database, " +                                  "so SQL for database creation will be generated instead.",                                  ex);                    }                }            }            if (shouldAlter)            {                Database currentModel = (getCatalogPattern() != null) || (getSchemaPattern() != null) ?                                             platform.readModelFromDatabase(null, getCatalogPattern(), getSchemaPattern(), null) :                                             platform.readModelFromDatabase(null);                platform.getSqlBuilder().alterDatabase(currentModel, model, params);            }            else            {                platform.getSqlBuilder().createTables(model, params, _doDrops);            }            writer.close();            _log.info("Written schema SQL to " + _outputFile.getAbsolutePath());        }        catch (Exception ex)        {            if (isFailOnError())            {                throw new BuildException(ex);            }            else            {                _log.error(ex);            }        }    }