GithubHelp home page GithubHelp logo

timwee / jdbi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jdbi/jdbi

1.0 3.0 1.0 9.83 MB

jDBI is designed to provide convenient tabular data access in Java(tm). It uses the Java collections framework for query results, provides a convenient means of externalizing sql statements, and provides named parameter support for any database being used.

Home Page: http://jdbi.org/

License: Apache License 2.0

jdbi's Introduction

jDBI provides a convenience interface for SQL operations in Java. It is not 
intended as an abstraction layer, but rather a library which makes the common 
things easy and the hard things possible, to paraphrase Larry Wall.

The primary entry point for using jDBI is the DBI class. This is used to create
Handle instances, each of which represents a connection to the RDBMS. A Handle 
wraps a JDBC Connection instance, and makes use of that same Connection for all 
of its operations.

Generally, you will explicitely create statements, queries, and batch 
operations for working with data in the database. Seperate objects are used to
represent these things, and they are designed to be used in a somewhat 
literate-programming style. Here is an example:

  DBI dbi = new DBI("jdbc:derby:testing");
  Handle handle = dbi.open();
  Query<Something> query = handle.createQuery("select * from something where name like :name")
                                 .bind("name", "Eri%")
                                 .map(Something.class);
  List<Something> rs = query.list();
  handle.close();


INSTALLATION

Building requires Apache Ant ( http://ant.apache.org/ )

If ant complains that it cannot find the JUnit task, copy
the junit-3.8.1.jar into the $ANT_HOME/lib directory, or into
$HOME/.ant/lib and try again.

To build the runtime library, use "ant jar"

    This will produce a jdbi-<version>.jar in the build/ directory

    There are no library dependencies for jDBI

To run the unit/regression test suite use "ant test"

    Test report will be in the report/ directory

    The test suite requires the libraries in the lib/test/ directory
    and uses the Apache Derby ( http://www.apache.org/ ) embedded
    database for its tests.

jdbi's People

Contributors

brianm avatar hgschmie avatar martint avatar arosien avatar

Stargazers

Tim Wee avatar

Watchers

Tim Wee avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.