Skip to content

Query API

Zsolt Herpai edited this page Feb 6, 2015 · 8 revisions

Instantiating

A Query interface can be created based on Connections from the ConnectionProvider:

Query query = fluentJdbc.query();

Or based on a specific Connection instance (eg for one session use):

Connection connection = ...
Query query = fluentJdbc.queryOn(connection);

Using the Query interface

Query instance is thread-safe (given it's ConnectionProvider is thread-safe) and re-entrant. Can be used to run any number of queries. An application generally instantiates a single instance of Query to implement it's Query operations.

Supported operations are:

  • Select
  • Insert / update
  • Batch insert / update

Clone this wiki locally