Interface Db.RowMapper<T>

Type Parameters:
T - 對應結果型別
Enclosing class:
Db
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Db.RowMapper<T>
把單一資料列(ResultSet 目前游標位置)對應成型別 T 的函式式介面。
  • Method Summary

    Modifier and Type
    Method
    Description
    讀取 rs 目前列並轉成 T
  • Method Details

    • map

      T map(ResultSet rs) throws SQLException
      讀取 rs 目前列並轉成 T。實作不可呼叫 rs.next()
      Parameters:
      rs - 已定位在某一列的結果集
      Returns:
      該列對應的結果
      Throws:
      SQLException - 讀取欄位失敗