JDBC實用工具組件 DbUtils 1.4 發布下載

fmms 13年前發布 | 14K 次閱讀 Java ORM

dbutils 1.4 發布了,dbutils 并不是一個嚴格意義上的 ORM 框架,它提供了一些Jdbc的操作封裝來簡化數據查詢和記錄讀取操作。本站使用的就是 dbutils 這個工具包來進行數據庫存取。
用法:

QueryRunner run = new QueryRunner(dataSource);
// Use the BeanHandler implementation to convert the first
// ResultSet row into a Person JavaBean.
ResultSetHandler h = new BeanHandler(Person.class);
// Execute the SQL statement with one replacement parameter and
// return the results in a new Person object generated by the BeanHandler.
Person p = (Person) run.query("SELECT * FROM Person WHERE name=?", "John Doe", h); 

新版本主要改進內容有:

新特性:

  • 增加異步批操作、查詢和更新調用  Issue: DBUTILS-78.

修復的bug:

  • DbUtils.loadDriver() uses Class.forName()  Issue: DBUTILS-81.
  • DbUtils.loadDriver catches Throwable  Issue: DBUTILS-80.
  • Duplicate code introduced during Java 1.5 branch merge  Issue: DBUTILS-65.
  • fillStatement doesn't complain when there are too few parameters

改變:

  • efficient usage from findbugs  Issue: DBUTILS-75.

下載地址:http://commons.apache.org/dbutils/download_dbutils.cgi

 本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!