Java--dbutils

Source: Internet
Author: User

dbutils

If we only use JDBC for development, we will find that there is too much redundant code, in order to simplify JDBC development, we use the Apache Commons component A member:dbutils.

Dbutils is a practical tool for database operations in Java Programming, small and simple.

The dbutils encapsulates the operation of JDBC , simplifies JDBC operations, and can write less code.

dbutils three core functions

    1. The API for SQL Statement operations is provided in Queryrunner .
    2. The Resultsethandler interface, which defines how the result set is encapsulated after a select operation .
    3. The dbutils class, which is a tool class that defines how to close resources and transaction processing
Queryrunner Core class
    • Update (Connection conn, String sql, Object ... params) , used to complete table data additions, deletions, update operations

    • Query (Connection conn, String sql, resultsethandler<t> rsh, Object ... params) for querying operations that complete table data

Java--dbutils

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.