@groovy.util.logging.Slf4j @groovy.transform.CompileStatic class H2DatabaseCleaner extends java.lang.Object implements DatabaseCleaner
DatabaseCleaner implementation for H2 databases. Truncates all tables in the resolved schema and optionally evicts the Hibernate second-level cache.
This cleaner identifies H2 databases by inspecting the JDBC URL of the datasource's
connection metadata. It supports both in-memory (jdbc:h2:mem:) and file-based
(jdbc:h2:) H2 databases.
| Constructor and description |
|---|
H2DatabaseCleaner() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
DatabaseCleanupStats |
cleanup(ApplicationContext applicationContext, javax.sql.DataSource dataSource) |
|
java.lang.String |
databaseType() |
|
boolean |
supports(javax.sql.DataSource dataSource) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |