Package com.celum.dbtool.configuration

Source Code of com.celum.dbtool.configuration.DefaultConfiguration

package com.celum.dbtool.configuration;

import com.celum.dbtool.Db;
import com.celum.dbtool.installer.DbVars;

/**
*
*/
public class DefaultConfiguration  extends DbConfiguration
{

    /** name of table where are steps/patches inserted. This table track the DB status. */
    protected String versionTable;

    /**
     * Construct the default configuration setup.
     */
    DefaultConfiguration(String versionTable)
    {
        this.versionTable = versionTable;
        setVariable(DbVars.PATCHTABLE, versionTable);
        setVersionSql("SELECT COUNT (*) FROM " + versionTable + " WHERE version LIKE '$version'");
        setVersionUpdateSqlScript("INSERT INTO " + versionTable + " (version, name) VALUES ('$version', '$name')");
    }


    @Override
    public Db build()
    {
        return new Db(this);
    }
}
TOP

Related Classes of com.celum.dbtool.configuration.DefaultConfiguration

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.