Package org.evomaster.client.java.sql
Class DbSpecification
java.lang.Object
org.evomaster.client.java.sql.DbSpecification
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Connectionsql connectionfinal DatabaseTypespecify a type of the databasefinal booleanspecify whether to employ the smart db clean by cleaning all data in table which have been accessed after every test Default is Truefinal Stringa resource path where the init sql script is Note that this parameter is specific to resource path, not a path to the file.final Stringa script to initialize the data in databaseschema name TODO might remove this later if we could get such info with the connection -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithInitSqlScript(String script) withSchemas(String... schemas)
-
Field Details
-
dbType
specify a type of the database -
connection
sql connection -
schemaNames
schema name TODO might remove this later if we could get such info with the connection -
initSqlScript
a script to initialize the data in database -
initSqlOnResourcePath
a resource path where the init sql script is Note that this parameter is specific to resource path, not a path to the file. -
employSmartDbClean
public final boolean employSmartDbCleanspecify whether to employ the smart db clean by cleaning all data in table which have been accessed after every test Default is True
-
-
Constructor Details
-
DbSpecification
-
-
Method Details
-
withSchemas
-
withDisabledSmartClean
- Returns:
- this with disabled smart cleaning. The cleaning of added/modified/deleted data in the database will have to be handled manually in the driver in the resetStateOfSUT() method.
-
withInitSqlScript
- Parameters:
script- a series of INSERT SQL commands, as a string.- Returns:
- this, with the given INSERT operations used to initialize the database, used as starting point for each test execution
-
withInitSqlOnResourcePath
- Parameters:
path- to a classpath resource having a text file with a series of INSERT SQL commands, read as strings.- Returns:
- this, with the given INSERT operations used to initialize the database, used as starting point for each test execution
-