orbrokerScala的JDBC框架
orbroker 是 Scala 编程语言的一个 JDBC 框架,示例代码:
object CustomerExtractor extends RowExtractor[Customer] {
// Construct object from row.
def extract(row: Row) = {
val id = row.integer("ID").get
val name = row.string("NAME").get
new Customer(id, name)
}
}
评论