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

datamaintain.core.db.driver.DatamaintainDriver.kt Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package datamaintain.core.db.driver

import datamaintain.core.step.executor.Execution
import datamaintain.domain.script.ExecutedScript
import datamaintain.domain.script.LightExecutedScript
import datamaintain.domain.script.ScriptWithContent

abstract class DatamaintainDriver(protected val uri: String) {

    /**
     * Reads the executed scripts from the database and returns them
     */
    abstract fun listExecutedScripts(): Sequence

    /**
     * Executes the given script
     */
    abstract fun executeScript(script: ScriptWithContent): Execution

    /**
     * Inserts script execution in the database
     */
    abstract fun markAsExecuted(executedScript: ExecutedScript): ExecutedScript

    /**
     * Update script execution in the database
     */
    abstract fun overrideScript(executedScript: ExecutedScript): ExecutedScript
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy