Class SqlScriptRunnerCached

java.lang.Object
org.evomaster.client.java.sql.SqlScriptRunnerCached

public class SqlScriptRunnerCached extends Object
Created by arcuri82 on 25-Oct-19.
  • Constructor Details

    • SqlScriptRunnerCached

      public SqlScriptRunnerCached()
  • Method Details

    • runScriptFromResourceFile

      public static void runScriptFromResourceFile(Connection connection, String... paths)
    • runScriptFromResourceFile

      public static void runScriptFromResourceFile(Connection connection, String resourcePath)
      Executes the SQL commands in the given resource file. The data is cached, so subsequent requests do not need to re-read the same files.
      Parameters:
      connection - the database connection to use for executing the script
      resourcePath - the path to the resource file containing the SQL commands
    • extractSqlScriptFromResourceFile

      public static List<String> extractSqlScriptFromResourceFile(String resourcePath)
      Extracts SQL script based on a given resource path.
      Parameters:
      resourcePath - the path to the resource file containing the SQL commands
      Returns:
      a list of SQL commands