JDBI icon
JDBI icon

JDBI

 1 like

JDBI is a SQL convenience library for Java. It attempts to expose relational database access in idiommatic Java, using collections, beans, and so on, while maintaining the same level of detail as JDBC.

License model

  • FreeProprietary

Platforms

  • Mac
  • Windows
  • Linux
  No rating
1 like
0comments
0 news articles

Features

Suggest and vote on features
No features, maybe you want to suggest one?

JDBI News & Activities

Highlights All activities

Recent activities

Show all activities

JDBI information

  • Developed by

    Brian McCallister
  • Licensing

    Proprietary and Free product.
  • Alternatives

    11 alternatives listed
  • Supported Languages

    • English

AlternativeTo Category

Development

Our users have written 0 comments and reviews about JDBI, and it has gotten 1 likes

JDBI was added to AlternativeTo by pedromachado on Aug 29, 2016 and this page was last updated Aug 30, 2016.
No comments or reviews, maybe you want to be first?
Post comment/review

What is JDBI?

JDBI is a SQL convenience library for Java. It attempts to expose relational database access in idiommatic Java, using collections, beans, and so on, while maintaining the same level of detail as JDBC. It exposes two different style APIs, a fluent style and a sql object style.

The DBI type is analogous to a JDBC DataSource, and will usually be constructed by passing in a JDBC DataSource. There are alternate constructors which take JDBC URL and credentials, and other means. From the DBI instance you obtain Handle instances. A Handle represents a single connection to the database. Handles rely on an underlying JDBC connection object.

With a handle you may create and execute statements, queries, calls, batches, or prepared batches. In the above example we execute a statement to define a table, execute another statement, this time with two positional arguments to insert a value, and finally construct a query, bind a value to a named argument in the query, map the results to a a String, and take the first result which comes back.

The named argument facility on statements and queries is provided by JDBI – it parses out the SQL and uses positional parameters when actually constructing the prepared statements. The above example uses the default colon-demarcated parser, but an alternative hash delimited parser is included as well for use with databases which use colons in their grammars, such as PostgreSQL.