Skip to content

Configuration

Zsolt Herpai edited this page Apr 10, 2015 · 3 revisions

FluentJdbc can be configured / customized through it's builder:

FluentJdbc fluentJdbc = new FluentJdbcBuilder()
    // configuration
    .build();

connectionProvider(cp)

Sets a ConnectionProvider for FluentJdbc to provide the Query API with Connections. See ConnectionProvider page for details and possible implementations.

paramSetters(setters)

Adds parameter setters to support query parameters of custom types, like UUID or other value objects. java.time is supported by default. Setters can be defined to override existing types - if necessary. Refer to Query parameter types for setter implementation details.

defaultFetchSize(Integer rows)

Overrides vendor default fetch size for select queries. Some vendors have default fetch sizes that may result in bad performance (Oracle defaults to 10), or memory issues (MySQL default is infinite).