Package org.evomaster.client.java.sql
Class SqlScriptRunnerCached
java.lang.Object
org.evomaster.client.java.sql.SqlScriptRunnerCached
Created by arcuri82 on 25-Oct-19.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractSqlScriptFromResourceFile(String resourcePath) Extracts SQL script based on a given resource path.static voidrunScriptFromResourceFile(Connection connection, String resourcePath) Executes the SQL commands in the given resource file.static voidrunScriptFromResourceFile(Connection connection, String... paths)
-
Constructor Details
-
SqlScriptRunnerCached
public SqlScriptRunnerCached()
-
-
Method Details
-
runScriptFromResourceFile
-
runScriptFromResourceFile
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 scriptresourcePath- the path to the resource file containing the SQL commands
-
extractSqlScriptFromResourceFile
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
-