open class JdbcTestUtils
JdbcTestUtils is a collection of JDBC related utility functions intended to simplify standard database testing scenarios.
Author
Thomas Risberg
Author
Sam Brannen
Author
Juergen Hoeller
Author
Phillip Webb
Author
Chris Baldwin
Since
2.5.4
See Also
org.springframework.jdbc.core.JdbcTemplateorg.springframework.jdbc.datasource.init.ScriptUtilsorg.springframework.jdbc.datasource.init.ResourceDatabasePopulatororg.springframework.jdbc.datasource.init.DatabasePopulatorUtils
JdbcTestUtils()
|
open static fun countRowsInTable(jdbcTemplate: JdbcTemplate, tableName: String): Int
Count the rows in the given table. |
|
open static fun countRowsInTableWhere(jdbcTemplate: JdbcTemplate, tableName: String, whereClause: String): Int
Count the rows in the given table, using the provided If the provided |
|
open static fun deleteFromTableWhere(jdbcTemplate: JdbcTemplate, tableName: String, whereClause: String, vararg args: Any): Int
Delete rows from the given table, using the provided If the provided As an alternative to hard-coded values, the |
|
open static fun deleteFromTables(jdbcTemplate: JdbcTemplate, vararg tableNames: String): Int
Delete all rows from the specified tables. |
|
open static fun dropTables(jdbcTemplate: JdbcTemplate, vararg tableNames: String): Unit
Drop the specified tables. |