spring-framework / org.springframework.jdbc.core

Package org.springframework.jdbc.core

Functions

query

fun <T : Any> JdbcOperations.query(sql: String, vararg args: Any, function: (ResultSet) -> T): T?

Extension for JdbcOperations.query providing a ResultSetExtractor-like function variant: query<Foo>("...", arg1, argN){ rs -> }.

fun JdbcOperations.query(sql: String, vararg args: Any, function: (ResultSet) -> Unit): Unit

Extension for JdbcOperations.query providing a RowCallbackHandler-like function variant: query("...", arg1, argN){ rs -> }.

fun <T : Any> JdbcOperations.query(sql: String, vararg args: Any, function: (ResultSet, Int) -> T): List<T>

Extensions for JdbcOperations.query providing a RowMapper-like function variant: query("...", arg1, argN){ rs, i -> }.

queryForList

fun <T : Any> JdbcOperations.queryForList(sql: String): List<T>

Extension for JdbcOperations.queryForList providing a queryForList<Foo>("...") variant.

fun <T : Any> JdbcOperations.queryForList(sql: String, args: Array<out Any>, argTypes: IntArray): List<T>

Extension for JdbcOperations.queryForList providing a queryForList<Foo>("...", arrayOf(arg1, argN), intArray(type1, typeN)) variant.

fun <T : Any> JdbcOperations.queryForList(sql: String, args: Array<out Any>): List<T>

Extension for JdbcOperations.queryForList providing a queryForList<Foo>("...", arrayOf(arg1, argN)) variant.

queryForObject

fun <T : Any> JdbcOperations.queryForObject(sql: String): T?

Extension for JdbcOperations.queryForObject providing a queryForObject<Foo>("...") variant.

fun <T : Any> JdbcOperations.queryForObject(sql: String, vararg args: Any, function: (ResultSet, Int) -> T): T?

Extensions for JdbcOperations.queryForObject providing a RowMapper-like function variant: queryForObject("...", arg1, argN){ rs, i -> }.

fun <T : Any> JdbcOperations.queryForObject(sql: String, args: Array<out Any>, argTypes: IntArray): T?

Extension for JdbcOperations.queryForObject providing a queryForObject<Foo>("...", arrayOf(arg1, argN), intArray(type1, typeN)) variant.

fun <T : Any> JdbcOperations.queryForObject(sql: String, args: Array<out Any>): T?

Extension for JdbcOperations.queryForObject providing a queryForObject<Foo>("...", arrayOf(arg1, argN)) variant.