Created
January 29, 2012 09:30
-
-
Save dbousamra/1698022 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Testingclass { | |
val jdbcTemplate = new JdbcTemplate | |
implicit def rowMapper[T <: AnyRef](f: (ResultSet) => T) = | |
new ParameterizedRowMapper[T] { | |
override def mapRow(rs: ResultSet, row: Int): T = f(rs) | |
} | |
val rowFunction = { rs:ResultSet => rs.getString("COLNAME") } | |
val stuffFromMSF010 = jdbcTemplate.query( | |
"SELECT * FROM MSF010", | |
rowFunction | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment