All Downloads are FREE. Search and download functionalities are using the official Maven repository.

liquibase.executor.Executor Maven / Gradle / Ivy

There is a newer version: 4.30.0
Show newest version
package liquibase.executor;

import liquibase.change.Change;
import liquibase.database.Database;
import liquibase.exception.DatabaseException;
import liquibase.sql.visitor.SqlVisitor;
import liquibase.statement.CallableSqlStatement;
import liquibase.statement.SqlStatement;

import java.util.List;
import java.util.Map;

public interface Executor {

    void setDatabase(Database database);

    /** Read methods */
      T queryForObject(SqlStatement sql, Class requiredType) throws DatabaseException;

     T queryForObject(SqlStatement sql, Class requiredType, List sqlVisitors) throws DatabaseException;

    long queryForLong(SqlStatement sql) throws DatabaseException;

    long queryForLong(SqlStatement sql, List sqlVisitors) throws DatabaseException;

    int queryForInt(SqlStatement sql) throws DatabaseException;

    int queryForInt(SqlStatement sql, List sqlVisitors) throws DatabaseException;

    List queryForList(SqlStatement sql, Class elementType) throws DatabaseException;

    List queryForList(SqlStatement sql, Class elementType, List sqlVisitors) throws DatabaseException;

    List> queryForList(SqlStatement sql) throws DatabaseException;

    List> queryForList(SqlStatement sql, List sqlVisitors) throws DatabaseException;


    /** Write methods */
    void execute(Change change) throws DatabaseException;

    void execute(Change change, List sqlVisitors) throws DatabaseException;

    void execute(SqlStatement sql) throws DatabaseException;

    void execute(SqlStatement sql, List sqlVisitors) throws DatabaseException;

    int update(SqlStatement sql) throws DatabaseException;

    int update(SqlStatement sql, List sqlVisitors) throws DatabaseException;

    /**
     * Adds a comment to the database.  Currently does nothing but is over-ridden in the output JDBC template
     * @param message
     * @throws liquibase.exception.DatabaseException
     */
    void comment(String message) throws DatabaseException;

    boolean updatesDatabase();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy