public class DbSpecification extends Object
| Modifier and Type | Field and Description |
|---|---|
Connection |
connection
sql connection
|
DatabaseType |
dbType
specify a type of the database
|
boolean |
employSmartDbClean
specify whether to employ the smart db clean by cleaning all
data in table which have been accessed after every test
Default is True
|
String |
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.
|
String |
initSqlScript
a script to initialize the data in database
|
List<String> |
schemaNames
schema name
TODO might remove this later if we could get such info with the connection
|
| Constructor and Description |
|---|
DbSpecification(DatabaseType dbType,
Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
DbSpecification |
withDisabledSmartClean() |
DbSpecification |
withInitSqlOnResourcePath(String path) |
DbSpecification |
withInitSqlScript(String script) |
DbSpecification |
withSchemas(String... schemas) |
public final DatabaseType dbType
public final Connection connection
public final List<String> schemaNames
public final String initSqlScript
public final String initSqlOnResourcePath
public final boolean employSmartDbClean
public DbSpecification(DatabaseType dbType, Connection connection)
public DbSpecification withSchemas(String... schemas)
public DbSpecification withDisabledSmartClean()
public DbSpecification withInitSqlScript(String script)
script - a series of INSERT SQL commands, as a string.public DbSpecification withInitSqlOnResourcePath(String path)
path - to a classpath resource having a text file with a series of INSERT SQL commands, read as strings.Copyright © 2016–2025. All rights reserved.