spring-framework
5.3.39

# queryForObject

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

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

#### Author

Mario Arias

#### Since

5.0

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

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

#### Author

Mario Arias

#### Since

5.0

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

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

#### Author

Mario Arias

#### Since

5.0

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

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

#### Author

Mario Arias

#### Since

5.0