Package org.springframework.jdbc.core

Functions

Link copied to clipboard
inline fun <T> JdbcOperations.query(sql: String, vararg args: Any, crossinline 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)

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

fun <T> 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 -> }.

Link copied to clipboard
inline fun <T> JdbcOperations.queryForList(sql: String): List<T>

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

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

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

inline fun <T> 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.

Link copied to clipboard
inline fun <T> JdbcOperations.queryForObject(sql: String): T

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

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

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

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

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

inline fun <T> 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.