JooqHelper

csw.database.javadsl.JooqHelper
object JooqHelper

A java helper wrapping few of the Jooq operations. JOOQ is a library that provides the mechanism to communicate with Database server. To know in detail about Jooq please refer https://www.jooq.org/learn/.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
JooqHelper.type

Members list

Value members

Concrete methods

def executeBatch(queries: Queries): CompletableFuture[Array[Int]]

Executes the batch of queries asynchronously. It wraps the Jooq's DSLContext#executeBatch() in a CompletableFuture and sends the entire batch of queries to database server for execution.

Executes the batch of queries asynchronously. It wraps the Jooq's DSLContext#executeBatch() in a CompletableFuture and sends the entire batch of queries to database server for execution.

Value parameters

queries

A Jooq type that represents a set of queries to execute in batch

Attributes

Returns

A completable future that completes with an array of integers. The integer, if it is greater than or equal to zero, indicates that the command was processed successfully and is an update count giving the number of rows in the database that were affected by the command's execution.

def fetchAsync[R](query: ResultQuery[Record], klass: Class[R]): CompletableFuture[List[R]]

Fetches the result in a CompletableFuture. It is a wrapper on Jooq's ResultQuery#fetchAsync().

Fetches the result in a CompletableFuture. It is a wrapper on Jooq's ResultQuery#fetchAsync().

Type parameters

R

the type to which result data gets casted

Value parameters

klass

the class of type 'R' used to cast the result data

query

the select query to fetch the data from database

Attributes

Returns

a CompletableFuture that completes with a list of data 'R'