-
- All Superinterfaces:
Attachable
,AutoCloseable
,Flow.Publisher<R>
,Iterable<R>
,org.reactivestreams.Publisher<R>
,Query
,QueryPart
,Serializable
,Statement
- All Known Subinterfaces:
Select<R>
,SelectConditionStep<R>
,SelectConnectByAfterStartWithConditionStep<R>
,SelectConnectByConditionStep<R>
,SelectConnectByStep<R>
,SelectDistinctOnStep<R>
,SelectFinalStep<R>
,SelectForUpdateOfStep<R>
,SelectForUpdateStep<R>
,SelectForUpdateWaitStep<R>
,SelectFromStep<R>
,SelectGroupByStep<R>
,SelectHavingConditionStep<R>
,SelectHavingStep<R>
,SelectIntoStep<R>
,SelectJoinStep<R>
,SelectLimitAfterOffsetStep<R>
,SelectLimitPercentAfterOffsetStep<R>
,SelectLimitPercentStep<R>
,SelectLimitStep<R>
,SelectOffsetStep<R>
,SelectOnConditionStep<R>
,SelectOptionalOnStep<R>
,SelectOptionStep<R>
,SelectOrderByStep<R>
,SelectQualifyConditionStep<R>
,SelectQualifyStep<R>
,SelectQuery<R>
,SelectSeekLimitStep<R>
,SelectSeekStep1<R,T1>
,SelectSeekStep10<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>
,SelectSeekStep11<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>
,SelectSeekStep12<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>
,SelectSeekStep13<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>
,SelectSeekStep14<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>
,SelectSeekStep15<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>
,SelectSeekStep16<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>
,SelectSeekStep17<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>
,SelectSeekStep18<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>
,SelectSeekStep19<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>
,SelectSeekStep2<R,T1,T2>
,SelectSeekStep20<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20>
,SelectSeekStep21<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21>
,SelectSeekStep22<R,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22>
,SelectSeekStep3<R,T1,T2,T3>
,SelectSeekStep4<R,T1,T2,T3,T4>
,SelectSeekStep5<R,T1,T2,T3,T4,T5>
,SelectSeekStep6<R,T1,T2,T3,T4,T5,T6>
,SelectSeekStep7<R,T1,T2,T3,T4,T5,T6,T7>
,SelectSeekStep8<R,T1,T2,T3,T4,T5,T6,T7,T8>
,SelectSeekStep9<R,T1,T2,T3,T4,T5,T6,T7,T8,T9>
,SelectSeekStepN<R>
,SelectSelectStep<R>
,SelectStartWithStep<R>
,SelectUnionStep<R>
,SelectWhereStep<R>
,SelectWindowStep<R>
,SelectWithTiesAfterOffsetStep<R>
,SelectWithTiesStep<R>
public interface ResultQuery<R extends Record> extends Query, Iterable<R>, org.reactivestreams.Publisher<R>, Flow.Publisher<R>
A query that can return results.jOOQ distinguishes between ordinary
Query
types, such asInsert
,Update
,Delete
, and anyDDLQuery
, which are meant to produce side effects in a database, and theResultQuery
, which is meant to produce aResult
through various means.The most common way to create a result is by calling
fetch()
, or by using the query'siterator()
method in a foreach loop:Result<TRecord> result = ctx.select(T.A, T.B).from(T).fetch(); for (TRecord record : ctx.select(T.A, T.B).from(T)) { // ... }
Most approaches to fetching results in
ResultQuery
(including the above), fetch the entire JDBCResultSet
eagerly into memory, which allows for closing the underlying JDBC resources as quickly as possible. Such operations are not resourceful, i.e. users do not need to worry about closing any resources.There are, however, some ways of fetching results lazily, and thus in a resourceful way. These include:
fetchLazy()
and related methods, which produce aCursor
for imperative style consumption of resulting records.fetchStream()
and related methods, which produce a JavaStream
for functional style consumption of resulting records.
In both cases, it is recommended to explicitly close the underlying resources (i.e. JDBC
ResultSet
) usingtry-with-resources
:try (Cursor<TRecord> cursor = ctx.select(T.A, T.B).from(T).fetchLazy()) { for (;;) { TRecord record = cursor.fetchNext(); if (record == null) break; // ... } } try (Stream<TRecord> stream = ctx.select(T.A, T.B).from(T).fetchStream()) { stream.forEach(record -> { // ... }); }
While most instances of
ResultQuery
implementSelect
, there also exist other types ofResultQuery
constructed e.g. from plain SQL APIs, such asDSLContext.resultQuery(String)
.- Author:
- Lukas Eder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description ResultQuery<R>
bind(int index, Object value)
Bind a new value to an indexed parameter.ResultQuery<R>
bind(String param, Object value)
Bind a new value to a named parameter.ResultQuery<Record>
coerce(Collection<? extends Field<?>> fields)
Coerce the result record type of this query to that of a set of fields.ResultQuery<Record>
coerce(Field<?>... fields)
Coerce the result record type of this query to that of a set of fields.<T1> ResultQuery<Record1<T1>>
coerce(Field<T1> field1)
Coerce the result record type of this query to that of a set of fields.<T1,T2>
ResultQuery<Record2<T1,T2>>coerce(Field<T1> field1, Field<T2> field2)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3>
ResultQuery<Record3<T1,T2,T3>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4>
ResultQuery<Record4<T1,T2,T3,T4>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5>
ResultQuery<Record5<T1,T2,T3,T4,T5>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6>
ResultQuery<Record6<T1,T2,T3,T4,T5,T6>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7>
ResultQuery<Record7<T1,T2,T3,T4,T5,T6,T7>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8>
ResultQuery<Record8<T1,T2,T3,T4,T5,T6,T7,T8>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9>
ResultQuery<Record9<T1,T2,T3,T4,T5,T6,T7,T8,T9>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>
ResultQuery<Record10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>
ResultQuery<Record11<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>
ResultQuery<Record12<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>
ResultQuery<Record13<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>
ResultQuery<Record14<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>
ResultQuery<Record15<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>
ResultQuery<Record16<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>
ResultQuery<Record17<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>
ResultQuery<Record18<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>
ResultQuery<Record19<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20>
ResultQuery<Record20<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21>
ResultQuery<Record21<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20, Field<T21> field21)
Coerce the result record type of this query to that of a set of fields.<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22>
ResultQuery<Record22<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22>>coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20, Field<T21> field21, Field<T22> field22)
Coerce the result record type of this query to that of a set of fields.<X extends Record>
ResultQuery<X>coerce(Table<X> table)
Coerce the result record type of this query to that of a table.<X,A>
Xcollect(Collector<? super R,A,X> collector)
Reduce the execution results of this query using aCollector
.Result<R>
fetch()
Execute the query and return the generated result.List<?>
fetch(int fieldIndex)
Execute the query and return all values for a field index from the generated result.<T> List<T>
fetch(int fieldIndex, Class<? extends T> type)
Execute the query and return all values for a field index from the generated result.<U> List<U>
fetch(int fieldIndex, Converter<?,? extends U> converter)
Execute the query and return all values for a field index from the generated result.List<?>
fetch(String fieldName)
Execute the query and return all values for a field name from the generated result.<T> List<T>
fetch(String fieldName, Class<? extends T> type)
Execute the query and return all values for a field name from the generated result.<U> List<U>
fetch(String fieldName, Converter<?,? extends U> converter)
Execute the query and return all values for a field name from the generated result.<T> List<T>
fetch(Field<?> field, Class<? extends T> type)
Execute the query and return all values for a field from the generated result.<T> List<T>
fetch(Field<T> field)
Execute the query and return all values for a field from the generated result.<T,U>
List<U>fetch(Field<T> field, Converter<? super T,? extends U> converter)
Execute the query and return all values for a field from the generated result.List<?>
fetch(Name fieldName)
Execute the query and return all values for a field name from the generated result.<T> List<T>
fetch(Name fieldName, Class<? extends T> type)
Execute the query and return all values for a field name from the generated result.<U> List<U>
fetch(Name fieldName, Converter<?,? extends U> converter)
Execute the query and return all values for a field name from the generated result.<E> List<E>
fetch(RecordMapper<? super R,E> mapper)
Fetch results into a custom mapper callback.R
fetchAny()
Execute the query and return at most one resulting record.Object
fetchAny(int fieldIndex)
Execute the query and return at most one resulting value for a field index from the generated result.<T> T
fetchAny(int fieldIndex, Class<? extends T> type)
Execute the query and return at most one resulting value for a field index from the generated result.<U> U
fetchAny(int fieldIndex, Converter<?,? extends U> converter)
Execute the query and return at most one resulting value for a field index from the generated result.Object
fetchAny(String fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<T> T
fetchAny(String fieldName, Class<? extends T> type)
Execute the query and return at most one resulting value for a field name from the generated result.<U> U
fetchAny(String fieldName, Converter<?,? extends U> converter)
Execute the query and return at most one resulting value for a field name from the generated result.<T> T
fetchAny(Field<?> field, Class<? extends T> type)
Execute the query and return at most one resulting value for a field from the generated result.<T> T
fetchAny(Field<T> field)
Execute the query and return at most one resulting value for a field from the generated result.<T,U>
UfetchAny(Field<T> field, Converter<? super T,? extends U> converter)
Execute the query and return at most one resulting value for a field from the generated result.Object
fetchAny(Name fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<T> T
fetchAny(Name fieldName, Class<? extends T> type)
Execute the query and return at most one resulting value for a field name from the generated result.<U> U
fetchAny(Name fieldName, Converter<?,? extends U> converter)
Execute the query and return at most one resulting value for a field name from the generated result.<E> E
fetchAny(RecordMapper<? super R,E> mapper)
Execute the query and return at most one resulting record.Object[]
fetchAnyArray()
Execute the query and return at most one resulting record as an array<E> E
fetchAnyInto(Class<? extends E> type)
Map resulting records onto a custom type.<Z extends Record>
ZfetchAnyInto(Table<Z> table)
Map resulting records onto a custom record.Map<String,Object>
fetchAnyMap()
Execute the query and return at most one resulting record as a name/value map.R[]
fetchArray()
Execute the query and return the generated result as an array of records.Object[]
fetchArray(int fieldIndex)
Execute the query and return all values for a field index from the generated result.<T> T[]
fetchArray(int fieldIndex, Class<? extends T> type)
Execute the query and return all values for a field index from the generated result.<U> U[]
fetchArray(int fieldIndex, Converter<?,? extends U> converter)
Execute the query and return all values for a field index from the generated result.Object[]
fetchArray(String fieldName)
Execute the query and return all values for a field name from the generated result.<T> T[]
fetchArray(String fieldName, Class<? extends T> type)
Execute the query and return all values for a field name from the generated result.<U> U[]
fetchArray(String fieldName, Converter<?,? extends U> converter)
Execute the query and return all values for a field name from the generated result.<T> T[]
fetchArray(Field<?> field, Class<? extends T> type)
Execute the query and return all values for a field from the generated result.<T> T[]
fetchArray(Field<T> field)
Execute the query and return all values for a field from the generated result.<T,U>
U[]fetchArray(Field<T> field, Converter<? super T,? extends U> converter)
Execute the query and return all values for a field from the generated result.Object[]
fetchArray(Name fieldName)
Execute the query and return all values for a field name from the generated result.<T> T[]
fetchArray(Name fieldName, Class<? extends T> type)
Execute the query and return all values for a field name from the generated result.<U> U[]
fetchArray(Name fieldName, Converter<?,? extends U> converter)
Execute the query and return all values for a field name from the generated result.Object[][]
fetchArrays()
Execute the query and return the generated result as an Object matrix.CompletionStage<Result<R>>
fetchAsync()
Fetch results in a newCompletionStage
.CompletionStage<Result<R>>
fetchAsync(Executor executor)
Fetch results in a newCompletionStage
that is asynchronously completed by a task running in the given executor.Map<?,Result<R>>
fetchGroups(int keyFieldIndex)
Execute the query and return aMap
with one of the result's columns as key and a list of corresponding records as value.Map<Record,Result<R>>
fetchGroups(int[] keyFieldIndexes)
Execute the query and return aMap
with the result grouped by the given keys.Map<Record,Result<Record>>
fetchGroups(int[] keyFieldIndexes, int[] valueFieldIndexes)
Execute the query and return aMap
with the result grouped by the given keys.<E> Map<Record,List<E>>
fetchGroups(int[] keyFieldIndexes, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.<E> Map<Record,List<E>>
fetchGroups(int[] keyFieldIndexes, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.Map<?,List<?>>
fetchGroups(int keyFieldIndex, int valueFieldIndex)
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as value<E> Map<?,List<E>>
fetchGroups(int keyFieldIndex, Class<? extends E> type)
Return aMap
with results grouped by the given key and mapped into the given entity type.<E> Map<?,List<E>>
fetchGroups(int keyFieldIndex, RecordMapper<? super R,E> mapper)
Return aMap
with results grouped by the given key and mapped by the given mapper.<K> Map<K,Result<R>>
fetchGroups(Class<? extends K> keyType)
Execute the query and return aMap
with results grouped by the given key entity.<K,V>
Map<K,List<V>>fetchGroups(Class<? extends K> keyType, Class<? extends V> valueType)
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.<K,V>
Map<K,List<V>>fetchGroups(Class<? extends K> keyType, RecordMapper<? super R,V> valueMapper)
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.Map<?,Result<R>>
fetchGroups(String keyFieldName)
Execute the query and return aMap
with one of the result's columns as key and a list of corresponding records as value.Map<Record,Result<R>>
fetchGroups(String[] keyFieldNames)
Execute the query and return aMap
with the result grouped by the given keys.<E> Map<Record,List<E>>
fetchGroups(String[] keyFieldNames, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.Map<Record,Result<Record>>
fetchGroups(String[] keyFieldNames, String[] valueFieldNames)
Execute the query and return aMap
with the result grouped by the given keys.<E> Map<Record,List<E>>
fetchGroups(String[] keyFieldNames, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.<E> Map<?,List<E>>
fetchGroups(String keyFieldName, Class<? extends E> type)
Return aMap
with results grouped by the given key and mapped into the given entity type.Map<?,List<?>>
fetchGroups(String keyFieldName, String valueFieldName)
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as value<E> Map<?,List<E>>
fetchGroups(String keyFieldName, RecordMapper<? super R,E> mapper)
Return aMap
with results grouped by the given key and mapped by the given mapper.Map<Record,Result<R>>
fetchGroups(Field<?>[] keys)
Execute the query and return aMap
with the result grouped by the given keys.<E> Map<Record,List<E>>
fetchGroups(Field<?>[] keys, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.Map<Record,Result<Record>>
fetchGroups(Field<?>[] keys, Field<?>[] values)
Execute the query and return aMap
with the result grouped by the given keys.<E> Map<Record,List<E>>
fetchGroups(Field<?>[] keys, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.<K> Map<K,Result<R>>
fetchGroups(Field<K> key)
Execute the query and return aMap
with one of the result's columns as key and a list of corresponding records as value.<K,E>
Map<K,List<E>>fetchGroups(Field<K> key, Class<? extends E> type)
Return aMap
with results grouped by the given key and mapped into the given entity type.<K,V>
Map<K,List<V>>fetchGroups(Field<K> key, Field<V> value)
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as value<K,E>
Map<K,List<E>>fetchGroups(Field<K> key, RecordMapper<? super R,E> mapper)
Return aMap
with results grouped by the given key and mapped by the given mapper.Map<?,Result<R>>
fetchGroups(Name keyFieldName)
Execute the query and return aMap
with one of the result's columns as key and a list of corresponding records as value.Map<Record,Result<R>>
fetchGroups(Name[] keyFieldNames)
Execute the query and return aMap
with the result grouped by the given keys.<E> Map<Record,List<E>>
fetchGroups(Name[] keyFieldNames, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.Map<Record,Result<Record>>
fetchGroups(Name[] keyFieldNames, Name[] valueFieldNames)
Execute the query and return aMap
with the result grouped by the given keys.<E> Map<Record,List<E>>
fetchGroups(Name[] keyFieldNames, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.<E> Map<?,List<E>>
fetchGroups(Name keyFieldName, Class<? extends E> type)
Return aMap
with results grouped by the given key and mapped into the given entity type.Map<?,List<?>>
fetchGroups(Name keyFieldName, Name valueFieldName)
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as value<E> Map<?,List<E>>
fetchGroups(Name keyFieldName, RecordMapper<? super R,E> mapper)
Return aMap
with results grouped by the given key and mapped by the given mapper.<K> Map<K,Result<R>>
fetchGroups(RecordMapper<? super R,K> keyMapper)
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.<K,V>
Map<K,List<V>>fetchGroups(RecordMapper<? super R,K> keyMapper, Class<V> valueType)
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.<K,V>
Map<K,List<V>>fetchGroups(RecordMapper<? super R,K> keyMapper, RecordMapper<? super R,V> valueMapper)
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.<S extends Record>
Map<S,Result<R>>fetchGroups(Table<S> table)
Execute the query and return aMap
with the result grouped by the given table.<E,S extends Record>
Map<S,List<E>>fetchGroups(Table<S> table, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given table and mapped into the given entity type.<E,S extends Record>
Map<S,List<E>>fetchGroups(Table<S> table, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given table and mapped by the given mapper.<S extends Record,T extends Record>
Map<S,Result<T>>fetchGroups(Table<S> keyTable, Table<T> valueTable)
Execute the query and return aMap
with the result grouped by the given table.<H extends RecordHandler<? super R>>
HfetchInto(H handler)
Fetch results into a custom handler callback.<E> List<E>
fetchInto(Class<? extends E> type)
Map resulting records onto a custom type.<Z extends Record>
Result<Z>fetchInto(Table<Z> table)
Map resulting records onto a custom record.FutureResult<R>
fetchLater()
Deprecated.- 3.2.0 - [#2581] - This method will be removed in jOOQ 4.0FutureResult<R>
fetchLater(ExecutorService executor)
Deprecated.- 3.2.0 - [#2581] - This method will be removed in jOOQ 4.0Cursor<R>
fetchLazy()
Execute the query and "lazily" return the generated result.Cursor<R>
fetchLazy(int fetchSize)
Deprecated.- [#2811] - 3.3.0 - UsefetchSize(int)
andfetchLazy()
instead.Results
fetchMany()
Execute a query, possibly returning several result sets.Map<?,R>
fetchMap(int keyFieldIndex)
Execute the query and return aMap
with one of the result's columns as key and the corresponding records as value.Map<Record,R>
fetchMap(int[] keyFieldIndexes)
Execute the query and return aMap
with keys as a map key and the corresponding record as value.Map<Record,Record>
fetchMap(int[] keyFieldIndexes, int[] valueFieldIndexes)
Execute the query and return aMap
with keys as a map key and the corresponding record as value.<E> Map<List<?>,E>
fetchMap(int[] keyFieldIndexes, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.<E> Map<List<?>,E>
fetchMap(int[] keyFieldIndexes, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.Map<?,?>
fetchMap(int keyFieldIndex, int valueFieldIndex)
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as value<E> Map<?,E>
fetchMap(int keyFieldIndex, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given key and mapped into the given entity type.<E> Map<?,E>
fetchMap(int keyFieldIndex, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given key and mapped by the given mapper.<K> Map<K,R>
fetchMap(Class<? extends K> keyType)
Execute the query and return aMap
with results grouped by the given key entity.<K,V>
Map<K,V>fetchMap(Class<? extends K> keyType, Class<? extends V> valueType)
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.<K,V>
Map<K,V>fetchMap(Class<? extends K> keyType, RecordMapper<? super R,V> valueMapper)
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.Map<?,R>
fetchMap(String keyFieldName)
Execute the query and return aMap
with one of the result's columns as key and the corresponding records as value.Map<Record,R>
fetchMap(String[] keyFieldNames)
Execute the query and return aMap
with keys as a map key and the corresponding record as value.<E> Map<List<?>,E>
fetchMap(String[] keyFieldNames, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.Map<Record,Record>
fetchMap(String[] keyFieldNames, String[] valueFieldNames)
Execute the query and return aMap
with keys as a map key and the corresponding record as value.<E> Map<List<?>,E>
fetchMap(String[] keyFieldNames, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.<E> Map<?,E>
fetchMap(String keyFieldName, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given key and mapped into the given entity type.Map<?,?>
fetchMap(String keyFieldName, String valueFieldName)
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as value<E> Map<?,E>
fetchMap(String keyFieldName, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given key and mapped by the given mapper.Map<Record,R>
fetchMap(Field<?>[] keys)
Execute the query and return aMap
with keys as a map key and the corresponding record as value.<E> Map<List<?>,E>
fetchMap(Field<?>[] keys, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.Map<Record,Record>
fetchMap(Field<?>[] keys, Field<?>[] values)
Execute the query and return aMap
with keys as a map key and the corresponding record as value.<E> Map<List<?>,E>
fetchMap(Field<?>[] keys, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.<K> Map<K,R>
fetchMap(Field<K> key)
Execute the query and return aMap
with one of the result's columns as key and the corresponding records as value.<K,E>
Map<K,E>fetchMap(Field<K> key, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given key and mapped into the given entity type.<K,V>
Map<K,V>fetchMap(Field<K> key, Field<V> value)
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as value<K,E>
Map<K,E>fetchMap(Field<K> key, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given key and mapped by the given mapper.Map<?,R>
fetchMap(Name keyFieldName)
Execute the query and return aMap
with one of the result's columns as key and the corresponding records as value.Map<Record,R>
fetchMap(Name[] keyFieldNames)
Execute the query and return aMap
with keys as a map key and the corresponding record as value.<E> Map<List<?>,E>
fetchMap(Name[] keyFieldNames, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.Map<Record,Record>
fetchMap(Name[] keyFieldNames, Name[] valueFieldNames)
Execute the query and return aMap
with keys as a map key and the corresponding record as value.<E> Map<List<?>,E>
fetchMap(Name[] keyFieldNames, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.<E> Map<?,E>
fetchMap(Name keyFieldName, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given key and mapped into the given entity type.Map<?,?>
fetchMap(Name keyFieldName, Name valueFieldName)
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as value<E> Map<?,E>
fetchMap(Name keyFieldName, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given key and mapped by the given mapper.<K> Map<K,R>
fetchMap(RecordMapper<? super R,K> keyMapper)
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.<K,V>
Map<K,V>fetchMap(RecordMapper<? super R,K> keyMapper, Class<V> valueType)
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.<K,V>
Map<K,V>fetchMap(RecordMapper<? super R,K> keyMapper, RecordMapper<? super R,V> valueMapper)
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.<S extends Record>
Map<S,R>fetchMap(Table<S> table)
Execute the query and return aMap
with table as a map key and the corresponding record as value.<E,S extends Record>
Map<S,E>fetchMap(Table<S> table, Class<? extends E> type)
Execute the query and return aMap
with results grouped by the given table and mapped into the given entity type.<E,S extends Record>
Map<S,E>fetchMap(Table<S> table, RecordMapper<? super R,E> mapper)
Execute the query and return aMap
with results grouped by the given table and mapped by the given mapper.<S extends Record,T extends Record>
Map<S,T>fetchMap(Table<S> keyTable, Table<T> valueTable)
Execute the query and return aMap
with table as a map key and the corresponding record as value.List<Map<String,Object>>
fetchMaps()
Execute the query and return the generated result as a list of name/value maps.R
fetchOne()
Execute the query and return at most one resulting record.Object
fetchOne(int fieldIndex)
Execute the query and return at most one resulting value for a field index from the generated result.<T> T
fetchOne(int fieldIndex, Class<? extends T> type)
Execute the query and return at most one resulting value for a field index from the generated result.<U> U
fetchOne(int fieldIndex, Converter<?,? extends U> converter)
Execute the query and return at most one resulting value for a field index from the generated result.Object
fetchOne(String fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<T> T
fetchOne(String fieldName, Class<? extends T> type)
Execute the query and return at most one resulting value for a field name from the generated result.<U> U
fetchOne(String fieldName, Converter<?,? extends U> converter)
Execute the query and return at most one resulting value for a field name from the generated result.<T> T
fetchOne(Field<?> field, Class<? extends T> type)
Execute the query and return at most one resulting value for a field from the generated result.<T> T
fetchOne(Field<T> field)
Execute the query and return at most one resulting value for a field from the generated result.<T,U>
UfetchOne(Field<T> field, Converter<? super T,? extends U> converter)
Execute the query and return at most one resulting value for a field from the generated result.Object
fetchOne(Name fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<T> T
fetchOne(Name fieldName, Class<? extends T> type)
Execute the query and return at most one resulting value for a field name from the generated result.<U> U
fetchOne(Name fieldName, Converter<?,? extends U> converter)
Execute the query and return at most one resulting value for a field name from the generated result.<E> E
fetchOne(RecordMapper<? super R,E> mapper)
Execute the query and return at most one resulting value into a custom mapper callback.Object[]
fetchOneArray()
Execute the query and return at most one resulting record as an array<E> E
fetchOneInto(Class<? extends E> type)
Map resulting records onto a custom type.<Z extends Record>
ZfetchOneInto(Table<Z> table)
Map resulting records onto a custom record.Map<String,Object>
fetchOneMap()
Execute the query and return at most one resulting record as a name/value map.Optional<R>
fetchOptional()
Execute the query and return at most one resulting record.Optional<?>
fetchOptional(int fieldIndex)
Execute the query and return at most one resulting value for a field index from the generated result.<T> Optional<T>
fetchOptional(int fieldIndex, Class<? extends T> type)
Execute the query and return at most one resulting value for a field index from the generated result.<U> Optional<U>
fetchOptional(int fieldIndex, Converter<?,? extends U> converter)
Execute the query and return at most one resulting value for a field index from the generated result.Optional<?>
fetchOptional(String fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<T> Optional<T>
fetchOptional(String fieldName, Class<? extends T> type)
Execute the query and return at most one resulting value for a field name from the generated result.<U> Optional<U>
fetchOptional(String fieldName, Converter<?,? extends U> converter)
Execute the query and return at most one resulting value for a field name from the generated result.<T> Optional<T>
fetchOptional(Field<?> field, Class<? extends T> type)
Execute the query and return at most one resulting value for a field from the generated result.<T> Optional<T>
fetchOptional(Field<T> field)
Execute the query and return at most one resulting value for a field from the generated result.<T,U>
Optional<U>fetchOptional(Field<T> field, Converter<? super T,? extends U> converter)
Execute the query and return at most one resulting value for a field from the generated result.Optional<?>
fetchOptional(Name fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<T> Optional<T>
fetchOptional(Name fieldName, Class<? extends T> type)
Execute the query and return at most one resulting value for a field name from the generated result.<U> Optional<U>
fetchOptional(Name fieldName, Converter<?,? extends U> converter)
Execute the query and return at most one resulting value for a field name from the generated result.<E> Optional<E>
fetchOptional(RecordMapper<? super R,E> mapper)
Execute the query and return at most one resulting value into a custom mapper callback.Optional<Object[]>
fetchOptionalArray()
Execute the query and return at most one resulting record as an array.<E> Optional<E>
fetchOptionalInto(Class<? extends E> type)
Map resulting records onto a custom type.<Z extends Record>
Optional<Z>fetchOptionalInto(Table<Z> table)
Map resulting records onto a custom record.Optional<Map<String,Object>>
fetchOptionalMap()
Execute the query and return at most one resulting record as a name/value map.ResultSet
fetchResultSet()
Execute the query and return the generated result as a JDBCResultSet
.Set<?>
fetchSet(int fieldIndex)
Execute the query and return all values for a field index from the generated result.<T> Set<T>
fetchSet(int fieldIndex, Class<? extends T> type)
Execute the query and return all values for a field index from the generated result.<U> Set<U>
fetchSet(int fieldIndex, Converter<?,? extends U> converter)
Execute the query and return all values for a field index from the generated result.Set<?>
fetchSet(String fieldName)
Execute the query and return all values for a field name from the generated result.<T> Set<T>
fetchSet(String fieldName, Class<? extends T> type)
Execute the query and return all values for a field name from the generated result.<U> Set<U>
fetchSet(String fieldName, Converter<?,? extends U> converter)
Execute the query and return all values for a field name from the generated result.<T> Set<T>
fetchSet(Field<?> field, Class<? extends T> type)
Execute the query and return all values for a field from the generated result.<T> Set<T>
fetchSet(Field<T> field)
Execute the query and return all values for a field from the generated result.<T,U>
Set<U>fetchSet(Field<T> field, Converter<? super T,? extends U> converter)
Execute the query and return all values for a field from the generated result.Set<?>
fetchSet(Name fieldName)
Execute the query and return all values for a field name from the generated result.<T> Set<T>
fetchSet(Name fieldName, Class<? extends T> type)
Execute the query and return all values for a field name from the generated result.<U> Set<U>
fetchSet(Name fieldName, Converter<?,? extends U> converter)
Execute the query and return all values for a field name from the generated result.<E> Set<E>
fetchSet(RecordMapper<? super R,E> mapper)
Fetch results into a custom mapper callback.R
fetchSingle()
Execute the query and return exactly one resulting record.Object
fetchSingle(int fieldIndex)
Execute the query and return exactly one resulting value for a field index from the generated result.<T> T
fetchSingle(int fieldIndex, Class<? extends T> type)
Execute the query and return exactly one resulting value for a field index from the generated result.<U> U
fetchSingle(int fieldIndex, Converter<?,? extends U> converter)
Execute the query and return exactly one resulting value for a field index from the generated result.Object
fetchSingle(String fieldName)
Execute the query and return exactly one resulting value for a field name from the generated result.<T> T
fetchSingle(String fieldName, Class<? extends T> type)
Execute the query and return exactly one resulting value for a field name from the generated result.<U> U
fetchSingle(String fieldName, Converter<?,? extends U> converter)
Execute the query and return exactly one resulting value for a field name from the generated result.<T> T
fetchSingle(Field<?> field, Class<? extends T> type)
Execute the query and return exactly one resulting value for a field from the generated result.<T> T
fetchSingle(Field<T> field)
Execute the query and return exactly one resulting value for a field from the generated result.<T,U>
UfetchSingle(Field<T> field, Converter<? super T,? extends U> converter)
Execute the query and return exactly one resulting value for a field from the generated result.Object
fetchSingle(Name fieldName)
Execute the query and return exactly one resulting value for a field name from the generated result.<T> T
fetchSingle(Name fieldName, Class<? extends T> type)
Execute the query and return exactly one resulting value for a field name from the generated result.<U> U
fetchSingle(Name fieldName, Converter<?,? extends U> converter)
Execute the query and return exactly one resulting value for a field name from the generated result.<E> E
fetchSingle(RecordMapper<? super R,E> mapper)
Execute the query and return exactly one resulting value into a custom mapper callback.Object[]
fetchSingleArray()
Execute the query and return exactly one resulting record as an array<E> E
fetchSingleInto(Class<? extends E> type)
Map resulting records onto a custom type.<Z extends Record>
ZfetchSingleInto(Table<Z> table)
Map resulting records onto a custom record.Map<String,Object>
fetchSingleMap()
Execute the query and return exactly one resulting record as a name/value map.ResultQuery<R>
fetchSize(int rows)
Specify the fetch size of the underlyingStatement
.Stream<R>
fetchStream()
Stream this query.<E> Stream<E>
fetchStreamInto(Class<? extends E> type)
Stream this query, mapping records into a custom type.<Z extends Record>
Stream<Z>fetchStreamInto(Table<Z> table)
Stream this query, mapping records into a custom record.default void
forEach(Consumer<? super R> action)
Execute the query usingfetch()
and pass all results to a consumer.Class<? extends R>
getRecordType()
The record type produced by this query.Result<R>
getResult()
Return the result generated by a previous call to execute().ResultQuery<R>
intern(int... fieldIndexes)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0ResultQuery<R>
intern(String... fieldNames)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0ResultQuery<R>
intern(Field<?>... fields)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0ResultQuery<R>
intern(Name... fieldNames)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0Iterator<R>
iterator()
ResultQuery<R>
keepStatement(boolean keepStatement)
Keep the query's underlying statement open after execution.ResultQuery<R>
maxRows(int rows)
Specify the maximum number of rows returned by the underlyingStatement
.ResultQuery<R>
poolable(boolean poolable)
Specify whether any JDBCStatement
created by this query should beStatement.setPoolable(boolean)
.ResultQuery<R>
queryTimeout(int timeout)
Specify the query timeout in number of seconds for the underlying JDBCStatement
.ResultQuery<R>
resultSetConcurrency(int resultSetConcurrency)
Specify theResultSet
concurrency ofResultSet
objects created by jOOQ.ResultQuery<R>
resultSetHoldability(int resultSetHoldability)
Specify theResultSet
holdability ofResultSet
objects created by jOOQ.ResultQuery<R>
resultSetType(int resultSetType)
Specify theResultSet
type ofResultSet
objects created by jOOQ.default Spliterator<R>
spliterator()
Execute the query usingfetch()
and return the generated result as anSpliterator
.Stream<R>
stream()
Stream this query.-
Methods inherited from interface org.jooq.Attachable
attach, configuration, detach
-
Methods inherited from interface java.util.concurrent.Flow.Publisher
subscribe
-
Methods inherited from interface org.jooq.Query
cancel, close, execute, executeAsync, executeAsync, getBindValues, getParam, getParams, getSQL, getSQL, getSQL, isExecutable
-
-
-
-
Method Detail
-
getResult
Result<R> getResult()
Return the result generated by a previous call to execute().- Returns:
- The result or
null
if no call to execute() was done previously.
-
fetch
Result<R> fetch() throws DataAccessException
Execute the query and return the generated result.This is the same as calling
Query.execute()
and thengetResult()
The result and its contained records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.Lifecycle guarantees
This method completes the wholeConnectionProvider
andExecuteListener
lifecycles, eagerly fetching all results into memory. Underlying JDBCResultSet
s are always closed. Underlying JDBCPreparedStatement
s are closed, unlesskeepStatement(boolean)
is set.In order to keep open
ResultSet
s and fetch records lazily, usefetchLazy()
instead and then operate onCursor
.- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchResultSet
ResultSet fetchResultSet() throws DataAccessException
Execute the query and return the generated result as a JDBCResultSet
.This is the same as calling
fetchLazy()
.resultSet()
and will return aResultSet
wrapping the JDBC driver'sResultSet
. Closing thisResultSet
may close the producingStatement
orPreparedStatement
, depending on your setting forkeepStatement(boolean)
.You can use this method when you want to use jOOQ for query execution, but not for result fetching. The returned
ResultSet
can also be used withDSLContext.fetch(ResultSet)
.- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query
-
iterator
Iterator<R> iterator() throws DataAccessException
- Specified by:
iterator
in interfaceIterable<R extends Record>
- Throws:
DataAccessException
-
spliterator
default Spliterator<R> spliterator()
- Specified by:
spliterator
in interfaceIterable<R extends Record>
-
fetchStream
Stream<R> fetchStream() throws DataAccessException
Stream this query.This is just a synonym for
stream()
.Clients should ensure the
Stream
is properly closed, e.g. in a try-with-resources statement:try (Stream<R> stream = query.stream()) { // Do things with stream }
If users prefer more fluent style streaming of queries,
ResultSet
can be registered and closed viaExecuteListener
, or via "smart" third-partyDataSource
s.Depending on your JDBC driver's default behaviour, this may load the whole database result into the driver's memory. In order to indicate to the driver that you may not want to fetch all records at once, use
fetchSize(int)
prior to calling this method.- Returns:
- The result.
- Throws:
DataAccessException
- if something went wrong executing the query- See Also:
stream()
-
fetchStreamInto
<E> Stream<E> fetchStreamInto(Class<? extends E> type) throws DataAccessException, MappingException
Stream this query, mapping records into a custom type.This is the same as calling
fetchStream().map(r -> r.into(type))
. SeeRecord.into(Class)
for more details.Clients should ensure the
Stream
is properly closed, e.g. in a try-with-resources statement:try (Stream<R> stream = query.stream()) { // Do things with stream }
If users prefer more fluent style streaming of queries,
ResultSet
can be registered and closed viaExecuteListener
, or via "smart" third-partyDataSource
s.Depending on your JDBC driver's default behaviour, this may load the whole database result into the driver's memory. In order to indicate to the driver that you may not want to fetch all records at once, use
fetchSize(int)
prior to calling this method.- Type Parameters:
E
- The generic entity type.- Parameters:
type
- The entity type.- Returns:
- The results.
- Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Record.into(Class)
,Result.into(Class)
,DefaultRecordMapper
-
fetchStreamInto
<Z extends Record> Stream<Z> fetchStreamInto(Table<Z> table) throws DataAccessException
Stream this query, mapping records into a custom record.This is the same as calling
fetchStream().map(r -> r.into(table))
. SeeRecord.into(Table)
for more details.The result and its contained records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.Clients should ensure the
Stream
is properly closed, e.g. in a try-with-resources statement:try (Stream<R> stream = query.stream()) { // Do things with stream }
If users prefer more fluent style streaming of queries,
ResultSet
can be registered and closed viaExecuteListener
, or via "smart" third-partyDataSource
s.Depending on your JDBC driver's default behaviour, this may load the whole database result into the driver's memory. In order to indicate to the driver that you may not want to fetch all records at once, use
fetchSize(int)
prior to calling this method.- Type Parameters:
Z
- The generic table record type.- Parameters:
table
- The table type.- Returns:
- The results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.into(Table)
,Result.into(Table)
-
stream
Stream<R> stream() throws DataAccessException
Stream this query.This is essentially the same as
fetchLazy()
but instead of returning aCursor
, a Java 8Stream
is returned. Clients should ensure theStream
is properly closed, e.g. in a try-with-resources statement:try (Stream<R> stream = query.stream()) { // Do things with stream }
If users prefer more fluent style streaming of queries,
ResultSet
can be registered and closed viaExecuteListener
, or via "smart" third-partyDataSource
s.Depending on your JDBC driver's default behaviour, this may load the whole database result into the driver's memory. In order to indicate to the driver that you may not want to fetch all records at once, use
fetchSize(int)
prior to calling this method.- Returns:
- The result.
- Throws:
DataAccessException
- if something went wrong executing the query
-
collect
<X,A> X collect(Collector<? super R,A,X> collector) throws DataAccessException
Reduce the execution results of this query using aCollector
.This works in the same way as calling the following code:
try (Stream<R> stream = resultQuery.stream()) { X result = stream.collect(collector); }
collect()
method.- Parameters:
collector
- The collector that collects all records and accumulates them into a result type.- Returns:
- The result of the collection.
- Throws:
DataAccessException
- if something went wrong executing the query
-
fetchLazy
Cursor<R> fetchLazy() throws DataAccessException
Execute the query and "lazily" return the generated result.The returned
Cursor
holds a reference to the executedPreparedStatement
and the associatedResultSet
. Data can be fetched (or iterated over) lazily, fetching records from theResultSet
one by one.Depending on your JDBC driver's default behaviour, this may load the whole database result into the driver's memory. In order to indicate to the driver that you may not want to fetch all records at once, use
fetchSize(int)
prior to calling this method.Client code is responsible for closing the cursor after use.
- Returns:
- The resulting cursor. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
fetchSize(int)
-
fetchLazy
@Deprecated Cursor<R> fetchLazy(int fetchSize) throws DataAccessException
Deprecated.- [#2811] - 3.3.0 - UsefetchSize(int)
andfetchLazy()
instead.Execute the query and "lazily" return the generated result.The returned
Cursor
holds a reference to the executedPreparedStatement
and the associatedResultSet
. Data can be fetched (or iterated over) lazily, fetching records from theResultSet
one by one.Depending on your JDBC driver's behaviour, this will load only
fetchSize
records from the database into memory at once. For more details, see alsoStatement.setFetchSize(int)
Client code is responsible for closing the cursor after use.
- Returns:
- The resulting cursor.
- Throws:
DataAccessException
- if something went wrong executing the query- See Also:
fetchLazy()
,Statement.setFetchSize(int)
-
fetchMany
Results fetchMany() throws DataAccessException
Execute a query, possibly returning several result sets.Example (Sybase ASE):
String sql = "sp_help 'my_table'";
The result and its contained records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Returns:
- The resulting records. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetch
<T> List<T> fetch(Field<T> field) throws DataAccessException
Execute the query and return all values for a field from the generated result.This is the same as calling
fetch()
and thenResult.getValues(Field)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetch
<T> List<T> fetch(Field<?> field, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field from the generated result.This is the same as calling
fetch()
and thenResult.getValues(Field, Class)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(Field, Class)
-
fetch
<T,U> List<U> fetch(Field<T> field, Converter<? super T,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field from the generated result.This is the same as calling
fetch()
and thenResult.getValues(Field, Converter)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(Field, Converter)
-
fetch
List<?> fetch(int fieldIndex) throws DataAccessException
Execute the query and return all values for a field index from the generated result.This is the same as calling
fetch()
and thenResult.getValues(int)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetch
<T> List<T> fetch(int fieldIndex, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field index from the generated result.This is the same as calling
fetch()
and thenResult.getValues(int, Class)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(int, Class)
-
fetch
<U> List<U> fetch(int fieldIndex, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field index from the generated result.This is the same as calling
fetch()
and thenResult.getValues(int, Converter)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(int, Converter)
-
fetch
List<?> fetch(String fieldName) throws DataAccessException
Execute the query and return all values for a field name from the generated result.This is the same as calling
fetch()
and thenResult.getValues(String)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetch
<T> List<T> fetch(String fieldName, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field name from the generated result.This is the same as calling
fetch()
and thenResult.getValues(String, Class)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(String, Class)
-
fetch
<U> List<U> fetch(String fieldName, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field name from the generated result.This is the same as calling
fetch()
and thenResult.getValues(String, Converter)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(String, Converter)
-
fetch
List<?> fetch(Name fieldName) throws DataAccessException
Execute the query and return all values for a field name from the generated result.This is the same as calling
fetch()
and thenResult.getValues(Name)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetch
<T> List<T> fetch(Name fieldName, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field name from the generated result.This is the same as calling
fetch()
and thenResult.getValues(Name, Class)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(Name, Class)
-
fetch
<U> List<U> fetch(Name fieldName, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field name from the generated result.This is the same as calling
fetch()
and thenResult.getValues(Name, Converter)
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(Name, Converter)
-
fetchOne
<T> T fetchOne(Field<T> field) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Field)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
<T> T fetchOne(Field<?> field, Class<? extends T> type) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Field, Class)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
<T,U> U fetchOne(Field<T> field, Converter<? super T,? extends U> converter) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Field, Converter)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
Object fetchOne(int fieldIndex) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field index from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(int)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
<T> T fetchOne(int fieldIndex, Class<? extends T> type) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field index from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(int, Class)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
<U> U fetchOne(int fieldIndex, Converter<?,? extends U> converter) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field index from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(int, Converter)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
Object fetchOne(String fieldName) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(String)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
<T> T fetchOne(String fieldName, Class<? extends T> type) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(String, Class)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
<U> U fetchOne(String fieldName, Converter<?,? extends U> converter) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(String, Converter)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
Object fetchOne(Name fieldName) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Name)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
<T> T fetchOne(Name fieldName, Class<? extends T> type) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Name, Class)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
<U> U fetchOne(Name fieldName, Converter<?,? extends U> converter) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Name, Converter)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
R fetchOne() throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting record.The resulting record is attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Returns:
- The resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOne
<E> E fetchOne(RecordMapper<? super R,E> mapper) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value into a custom mapper callback.- Returns:
- The custom mapped record or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOneMap
Map<String,Object> fetchOneMap() throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting record as a name/value map.- Returns:
- The resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record- See Also:
Result.intoMaps()
,Record.intoMap()
-
fetchOneArray
Object[] fetchOneArray() throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting record as an arrayYou can access data like this
query.fetchOneArray()[fieldIndex]
- Returns:
- The resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOneInto
<E> E fetchOneInto(Class<? extends E> type) throws DataAccessException, MappingException, TooManyRowsException
Map resulting records onto a custom type.This is the same as calling
. SeeE result = null; Record r = q.fetchOne(); if (r != null) result = r.into(type);
Record.into(Class)
for more details- Type Parameters:
E
- The generic entity type.- Parameters:
type
- The entity type.- Returns:
- The resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping recordsTooManyRowsException
- if the query returned more than one record- See Also:
Record.into(Class)
,Result.into(Class)
,DefaultRecordMapper
-
fetchOneInto
<Z extends Record> Z fetchOneInto(Table<Z> table) throws DataAccessException, TooManyRowsException
Map resulting records onto a custom record.This is the same as calling
. SeeZ result = null; Record r = q.fetchOne(); if (r != null) result = r.into(table);
Record.into(Table)
for more detailsThe resulting record is attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Type Parameters:
Z
- The generic table record type.- Parameters:
table
- The table type.- Returns:
- The resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record- See Also:
Record.into(Table)
,Result.into(Table)
-
fetchSingle
<T> T fetchSingle(Field<T> field) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(Field)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
<T> T fetchSingle(Field<?> field, Class<? extends T> type) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(Field, Class)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
<T,U> U fetchSingle(Field<T> field, Converter<? super T,? extends U> converter) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(Field, Converter)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
Object fetchSingle(int fieldIndex) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field index from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(int)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
<T> T fetchSingle(int fieldIndex, Class<? extends T> type) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field index from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(int, Class)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
<U> U fetchSingle(int fieldIndex, Converter<?,? extends U> converter) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field index from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(int, Converter)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
Object fetchSingle(String fieldName) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field name from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(String)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
<T> T fetchSingle(String fieldName, Class<? extends T> type) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field name from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(String, Class)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
<U> U fetchSingle(String fieldName, Converter<?,? extends U> converter) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field name from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(String, Converter)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
Object fetchSingle(Name fieldName) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field name from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(Name)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
<T> T fetchSingle(Name fieldName, Class<? extends T> type) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field name from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(Name, Class)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
<U> U fetchSingle(Name fieldName, Converter<?,? extends U> converter) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value for a field name from the generated result.This is the same as calling
fetchSingle()
and thenRecord.get(Name, Converter)
- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
R fetchSingle() throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting record.The resulting record is attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Returns:
- The resulting value. This is never
null
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingle
<E> E fetchSingle(RecordMapper<? super R,E> mapper) throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting value into a custom mapper callback.- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingleMap
Map<String,Object> fetchSingleMap() throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting record as a name/value map.- Returns:
- The resulting value. This is never
null
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record- See Also:
Result.intoMaps()
,Record.intoMap()
-
fetchSingleArray
Object[] fetchSingleArray() throws DataAccessException, NoDataFoundException, TooManyRowsException
Execute the query and return exactly one resulting record as an arrayYou can access data like this
query.fetchSingleArray()[fieldIndex]
- Returns:
- The resulting value. This is never
null
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record
-
fetchSingleInto
<E> E fetchSingleInto(Class<? extends E> type) throws DataAccessException, MappingException, NoDataFoundException, TooManyRowsException
Map resulting records onto a custom type.This is the same as calling
. SeeE result = null; Record r = q.fetchSingle(); if (r != null) result = r.into(type);
Record.into(Class)
for more details- Type Parameters:
E
- The generic entity type.- Parameters:
type
- The entity type.- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping recordsNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record- See Also:
Record.into(Class)
,Result.into(Class)
,DefaultRecordMapper
-
fetchSingleInto
<Z extends Record> Z fetchSingleInto(Table<Z> table) throws DataAccessException, NoDataFoundException, TooManyRowsException
Map resulting records onto a custom record.This is the same as calling
. SeeZ result = null; Record r = q.fetchSingle(); if (r != null) result = r.into(table);
Record.into(Table)
for more detailsThe resulting record is attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Type Parameters:
Z
- The generic table record type.- Parameters:
table
- The table type.- Returns:
- The resulting value. Unlike other
fetchSingle()
methods, which never producenull
records, this can be null if the resulting value in the record isnull
. - Throws:
DataAccessException
- if something went wrong executing the queryNoDataFoundException
- if the query returned no recordsTooManyRowsException
- if the query returned more than one record- See Also:
Record.into(Table)
,Result.into(Table)
-
fetchOptional
<T> Optional<T> fetchOptional(Field<T> field) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(Field)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
<T> Optional<T> fetchOptional(Field<?> field, Class<? extends T> type) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(Field, Class)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
<T,U> Optional<U> fetchOptional(Field<T> field, Converter<? super T,? extends U> converter) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(Field, Converter)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
Optional<?> fetchOptional(int fieldIndex) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field index from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(int)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
<T> Optional<T> fetchOptional(int fieldIndex, Class<? extends T> type) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field index from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(int, Class)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
<U> Optional<U> fetchOptional(int fieldIndex, Converter<?,? extends U> converter) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field index from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(int, Converter)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
Optional<?> fetchOptional(String fieldName) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(String)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
<T> Optional<T> fetchOptional(String fieldName, Class<? extends T> type) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(String, Class)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
<U> Optional<U> fetchOptional(String fieldName, Converter<?,? extends U> converter) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(String, Converter)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
Optional<?> fetchOptional(Name fieldName) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(Name)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
<T> Optional<T> fetchOptional(Name fieldName, Class<? extends T> type) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(Name, Class)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
<U> Optional<U> fetchOptional(Name fieldName, Converter<?,? extends U> converter) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOptional()
and thenRecord.get(Name, Converter)
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
Optional<R> fetchOptional() throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting record.The resulting record is attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Returns:
- The resulting record
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
<E> Optional<E> fetchOptional(RecordMapper<? super R,E> mapper) throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting value into a custom mapper callback.- Returns:
- The custom mapped record
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptionalMap
Optional<Map<String,Object>> fetchOptionalMap() throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting record as a name/value map.- Returns:
- The resulting record
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record- See Also:
Result.intoMaps()
,Record.intoMap()
-
fetchOptionalArray
Optional<Object[]> fetchOptionalArray() throws DataAccessException, TooManyRowsException
Execute the query and return at most one resulting record as an array.- Returns:
- The resulting record
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptionalInto
<E> Optional<E> fetchOptionalInto(Class<? extends E> type) throws DataAccessException, MappingException, TooManyRowsException
Map resulting records onto a custom type.This is the same as calling
. SeeOptional<E> result = q.fetchOptional().map(r -> r.into(type));
Record.into(Class)
for more details- Type Parameters:
E
- The generic entity type.- Parameters:
type
- The entity type.- Returns:
- The resulting record
- Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping recordsTooManyRowsException
- if the query returned more than one record- See Also:
Record.into(Class)
,Result.into(Class)
,DefaultRecordMapper
-
fetchOptionalInto
<Z extends Record> Optional<Z> fetchOptionalInto(Table<Z> table) throws DataAccessException, TooManyRowsException
Map resulting records onto a custom record.This is the same as calling
. SeeOptional<Z> result = q.fetchOptional().map(r -> r.into(table));
Record.into(Table)
for more detailsThe resulting record is attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Type Parameters:
Z
- The generic table record type.- Parameters:
table
- The table type.- Returns:
- The resulting record
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record- See Also:
Record.into(Table)
,Result.into(Table)
-
fetchAny
<T> T fetchAny(Field<T> field) throws DataAccessException
Execute the query and return at most one resulting value for a field from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Field)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
<T> T fetchAny(Field<?> field, Class<? extends T> type) throws DataAccessException
Execute the query and return at most one resulting value for a field from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Field, Class)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
<T,U> U fetchAny(Field<T> field, Converter<? super T,? extends U> converter) throws DataAccessException
Execute the query and return at most one resulting value for a field from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Field, Converter)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
Object fetchAny(int fieldIndex) throws DataAccessException
Execute the query and return at most one resulting value for a field index from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(int)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
<T> T fetchAny(int fieldIndex, Class<? extends T> type) throws DataAccessException
Execute the query and return at most one resulting value for a field index from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(int, Class)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
<U> U fetchAny(int fieldIndex, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return at most one resulting value for a field index from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(int, Converter)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
Object fetchAny(String fieldName) throws DataAccessException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(String)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
<T> T fetchAny(String fieldName, Class<? extends T> type) throws DataAccessException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(String, Class)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
<U> U fetchAny(String fieldName, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(String, Converter)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
Object fetchAny(Name fieldName) throws DataAccessException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Name)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
<T> T fetchAny(Name fieldName, Class<? extends T> type) throws DataAccessException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Name, Class)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
<U> U fetchAny(Name fieldName, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return at most one resulting value for a field name from the generated result.This is the same as calling
fetchOne()
and thenRecord.get(Name, Converter)
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
R fetchAny() throws DataAccessException
Execute the query and return at most one resulting record.The resulting record is attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Returns:
- The first resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
<E> E fetchAny(RecordMapper<? super R,E> mapper) throws DataAccessException
Execute the query and return at most one resulting record.The resulting record is attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Returns:
- The first resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAnyMap
Map<String,Object> fetchAnyMap() throws DataAccessException
Execute the query and return at most one resulting record as a name/value map.- Returns:
- The resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoMaps()
,Record.intoMap()
-
fetchAnyArray
Object[] fetchAnyArray() throws DataAccessException
Execute the query and return at most one resulting record as an arrayYou can access data like this
query.fetchAnyArray()[fieldIndex]
- Returns:
- The resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAnyInto
<E> E fetchAnyInto(Class<? extends E> type) throws DataAccessException, MappingException
Map resulting records onto a custom type.This is the same as calling
. SeeE result = null; Record r = q.fetchAny(); if (r != null) result = r.into(type);
Record.into(Class)
for more details- Type Parameters:
E
- The generic entity type.- Parameters:
type
- The entity type.- Returns:
- The resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Record.into(Class)
,Result.into(Class)
,DefaultRecordMapper
-
fetchAnyInto
<Z extends Record> Z fetchAnyInto(Table<Z> table) throws DataAccessException
Map resulting records onto a custom record.This is the same as calling
. SeeZ result = null; Record r = q.fetchOne(); if (r != null) result = r.into(table);
Record.into(Table)
for more detailsThe resulting record is attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Type Parameters:
Z
- The generic table record type.- Parameters:
table
- The table type.- Returns:
- The resulting record or
null
if the query returns no records. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.into(Table)
,Result.into(Table)
-
fetchMaps
List<Map<String,Object>> fetchMaps() throws DataAccessException
Execute the query and return the generated result as a list of name/value maps.- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key field returned two or more equal values from the result set.- See Also:
Result.intoMaps()
,Record.intoMap()
-
fetchMap
<K> Map<K,R> fetchMap(Field<K> key) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and the corresponding records as value.An exception is thrown, if the key turns out to be non-unique in the result set. Use
fetchGroups(Field)
instead, if your keys are non-uniqueThe resulting records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Type Parameters:
K
- The key's generic field type- Parameters:
key
- The key field. Client code must assure that this field is unique in the result set.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key field returned two or more equal values from the result set.- See Also:
Result.intoMap(Field)
-
fetchMap
Map<?,R> fetchMap(int keyFieldIndex) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and the corresponding records as value.An exception is thrown, if the key turns out to be non-unique in the result set. Use
fetchGroups(int)
instead, if your keys are non-uniqueThe resulting records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Parameters:
keyFieldIndex
- The key field. Client code must assure that this field is unique in the result set.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key field returned two or more equal values from the result set.- See Also:
Result.intoMap(int)
-
fetchMap
Map<?,R> fetchMap(String keyFieldName) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and the corresponding records as value.An exception is thrown, if the key turns out to be non-unique in the result set. Use
fetchGroups(String)
instead, if your keys are non-uniqueThe resulting records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Parameters:
keyFieldName
- The key field. Client code must assure that this field is unique in the result set.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key field returned two or more equal values from the result set.- See Also:
Result.intoMap(String)
-
fetchMap
Map<?,R> fetchMap(Name keyFieldName) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and the corresponding records as value.An exception is thrown, if the key turns out to be non-unique in the result set. Use
fetchGroups(Name)
instead, if your keys are non-uniqueThe resulting records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Parameters:
keyFieldName
- The key field. Client code must assure that this field is unique in the result set.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key field returned two or more equal values from the result set.- See Also:
Result.intoMap(Name)
-
fetchMap
<K,V> Map<K,V> fetchMap(Field<K> key, Field<V> value) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as valueAn exception is thrown, if the key turns out to be non-unique in the result set. Use
fetchGroups(Field, Field)
instead, if your keys are non-unique- Type Parameters:
K
- The key's generic field typeV
- The value's generic field type- Parameters:
key
- The key field. Client code must assure that this field is unique in the result set.value
- The value field- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key field returned two or more equal values from the result set.- See Also:
Result.intoMap(Field, Field)
-
fetchMap
Map<?,?> fetchMap(int keyFieldIndex, int valueFieldIndex) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as valueAn exception is thrown, if the key turns out to be non-unique in the result set. Use
fetchGroups(int, int)
instead, if your keys are non-unique- Parameters:
keyFieldIndex
- The key field. Client code must assure that this field is unique in the result set.valueFieldIndex
- The value field- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key field returned two or more equal values from the result set.- See Also:
Result.intoMap(int, int)
-
fetchMap
Map<?,?> fetchMap(String keyFieldName, String valueFieldName) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as valueAn exception is thrown, if the key turns out to be non-unique in the result set. Use
fetchGroups(String, String)
instead, if your keys are non-unique- Parameters:
keyFieldName
- The key field. Client code must assure that this field is unique in the result set.valueFieldName
- The value field- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key field returned two or more equal values from the result set.- See Also:
Result.intoMap(String, String)
-
fetchMap
Map<?,?> fetchMap(Name keyFieldName, Name valueFieldName) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as valueAn exception is thrown, if the key turns out to be non-unique in the result set. Use
fetchGroups(Name, Name)
instead, if your keys are non-unique- Parameters:
keyFieldName
- The key field. Client code must assure that this field is unique in the result set.valueFieldName
- The value field- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key field returned two or more equal values from the result set.- See Also:
Result.intoMap(Name, Name)
-
fetchMap
Map<Record,R> fetchMap(Field<?>[] keys) throws DataAccessException
Execute the query and return aMap
with keys as a map key and the corresponding record as value.An exception is thrown, if the keys turn out to be non-unique in the result set. Use
fetchGroups(Field[])
instead, if your keys are non-unique.- Parameters:
keys
- The keys. Client code must assure that keys are unique in the result set.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key list is non-unique in the result set.- See Also:
Result.intoMap(Field[])
-
fetchMap
Map<Record,R> fetchMap(int[] keyFieldIndexes) throws DataAccessException
Execute the query and return aMap
with keys as a map key and the corresponding record as value.An exception is thrown, if the keys turn out to be non-unique in the result set. Use
fetchGroups(int[])
instead, if your keys are non-unique.- Parameters:
keyFieldIndexes
- The keys. Client code must assure that keys are unique in the result set.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key list is non-unique in the result set.- See Also:
Result.intoMap(int[])
-
fetchMap
Map<Record,R> fetchMap(String[] keyFieldNames) throws DataAccessException
Execute the query and return aMap
with keys as a map key and the corresponding record as value.An exception is thrown, if the keys turn out to be non-unique in the result set. Use
fetchGroups(String[])
instead, if your keys are non-unique.- Parameters:
keyFieldNames
- The keys. Client code must assure that keys are unique in the result set.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key list is non-unique in the result set.- See Also:
Result.intoMap(String[])
-
fetchMap
Map<Record,R> fetchMap(Name[] keyFieldNames) throws DataAccessException
Execute the query and return aMap
with keys as a map key and the corresponding record as value.An exception is thrown, if the keys turn out to be non-unique in the result set. Use
fetchGroups(Name[])
instead, if your keys are non-unique.- Parameters:
keyFieldNames
- The keys. Client code must assure that keys are unique in the result set.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key list is non-unique in the result set.- See Also:
Result.intoMap(Name[])
-
fetchMap
Map<Record,Record> fetchMap(Field<?>[] keys, Field<?>[] values) throws DataAccessException
Execute the query and return aMap
with keys as a map key and the corresponding record as value.An exception is thrown, if the keys turn out to be non-unique in the result set. Use
fetchGroups(Field[], Field[])
instead, if your keys are non-unique.- Parameters:
keys
- The keys. Client code must assure that keys are unique in the result set.values
- The values.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key list is non-unique in the result set.- See Also:
Result.intoMap(Field[], Field[])
-
fetchMap
Map<Record,Record> fetchMap(int[] keyFieldIndexes, int[] valueFieldIndexes) throws DataAccessException
Execute the query and return aMap
with keys as a map key and the corresponding record as value.An exception is thrown, if the keys turn out to be non-unique in the result set. Use
fetchGroups(int[], int[])
instead, if your keys are non-unique.- Parameters:
keyFieldIndexes
- The keys. Client code must assure that keys are unique in the result set.valueFieldIndexes
- The values.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key list is non-unique in the result set.- See Also:
Result.intoMap(int[], int[])
-
fetchMap
Map<Record,Record> fetchMap(String[] keyFieldNames, String[] valueFieldNames) throws DataAccessException
Execute the query and return aMap
with keys as a map key and the corresponding record as value.An exception is thrown, if the keys turn out to be non-unique in the result set. Use
fetchGroups(String[], String[])
instead, if your keys are non-unique.- Parameters:
keyFieldNames
- The keys. Client code must assure that keys are unique in the result set.valueFieldNames
- The values.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key list is non-unique in the result set.- See Also:
Result.intoMap(String[], String[])
-
fetchMap
Map<Record,Record> fetchMap(Name[] keyFieldNames, Name[] valueFieldNames) throws DataAccessException
Execute the query and return aMap
with keys as a map key and the corresponding record as value.An exception is thrown, if the keys turn out to be non-unique in the result set. Use
fetchGroups(Name[], Name[])
instead, if your keys are non-unique.- Parameters:
keyFieldNames
- The keys. Client code must assure that keys are unique in the result set.valueFieldNames
- The values.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key list is non-unique in the result set.- See Also:
Result.intoMap(Name[], Name[])
-
fetchMap
<E> Map<List<?>,E> fetchMap(Field<?>[] keys, Class<? extends E> type) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(Field[], Class)
instead, if your keys are non-unique.- Parameters:
keys
- The keys. Client code must assure that keys are unique in the result set. If this isnull
or an empty array, the resulting map will contain at most one entry.type
- The entity type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the keys are non-unique in the result set.MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoMap(Field[], Class)
,DefaultRecordMapper
-
fetchMap
<E> Map<List<?>,E> fetchMap(int[] keyFieldIndexes, Class<? extends E> type) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(int[], Class)
instead, if your keys are non-unique.- Parameters:
keyFieldIndexes
- The keys. Client code must assure that keys are unique in the result set. If this isnull
or an empty array, the resulting map will contain at most one entry.type
- The entity type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the keys are non-unique in the result set.MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoMap(int[], Class)
,DefaultRecordMapper
-
fetchMap
<E> Map<List<?>,E> fetchMap(String[] keyFieldNames, Class<? extends E> type) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(String[], Class)
instead, if your keys are non-unique.- Parameters:
keyFieldNames
- The keys. Client code must assure that keys are unique in the result set. If this isnull
or an empty array, the resulting map will contain at most one entry.type
- The entity type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the keys are non-unique in the result set.MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoMap(String[], Class)
,DefaultRecordMapper
-
fetchMap
<E> Map<List<?>,E> fetchMap(Name[] keyFieldNames, Class<? extends E> type) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(Name[], Class)
instead, if your keys are non-unique.- Parameters:
keyFieldNames
- The keys. Client code must assure that keys are unique in the result set. If this isnull
or an empty array, the resulting map will contain at most one entry.type
- The entity type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the keys are non-unique in the result set.MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoMap(Name[], Class)
,DefaultRecordMapper
-
fetchMap
<E> Map<List<?>,E> fetchMap(Field<?>[] keys, RecordMapper<? super R,E> mapper) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(Field[], RecordMapper)
instead, if your keys are non-unique.- Parameters:
keys
- The keys. Client code must assure that keys are unique in the result set. If this isnull
or an empty array, the resulting map will contain at most one entry.mapper
- The mapper callback.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the keys are non-unique in the result set.MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoMap(Field[], Class)
,DefaultRecordMapper
-
fetchMap
<E> Map<List<?>,E> fetchMap(int[] keyFieldIndexes, RecordMapper<? super R,E> mapper) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(int[], RecordMapper)
instead, if your keys are non-unique.- Parameters:
keyFieldIndexes
- The keys. Client code must assure that keys are unique in the result set. If this isnull
or an empty array, the resulting map will contain at most one entry.mapper
- The mapper callback.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the keys are non-unique in the result set.MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoMap(int[], Class)
,DefaultRecordMapper
-
fetchMap
<E> Map<List<?>,E> fetchMap(String[] keyFieldNames, RecordMapper<? super R,E> mapper) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(String[], RecordMapper)
instead, if your keys are non-unique.- Parameters:
keyFieldNames
- The keys. Client code must assure that keys are unique in the result set. If this isnull
or an empty array, the resulting map will contain at most one entry.mapper
- The mapper callback.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the keys are non-unique in the result set.MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoMap(String[], Class)
,DefaultRecordMapper
-
fetchMap
<E> Map<List<?>,E> fetchMap(Name[] keyFieldNames, RecordMapper<? super R,E> mapper) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(Name[], RecordMapper)
instead, if your keys are non-unique.- Parameters:
keyFieldNames
- The keys. Client code must assure that keys are unique in the result set. If this isnull
or an empty array, the resulting map will contain at most one entry.mapper
- The mapper callback.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the keys are non-unique in the result set.MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoMap(Name[], Class)
,DefaultRecordMapper
-
fetchMap
<K> Map<K,R> fetchMap(Class<? extends K> keyType) throws DataAccessException, MappingException, InvalidResultException
Execute the query and return aMap
with results grouped by the given key entity.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(Class)
instead, if your keys are non-unique.- Parameters:
keyType
- The key type. If this isnull
, the resulting map will contain at most one entry.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping recordsInvalidResultException
- if the key list is non-unique in the result set.DataAccessException
- See Also:
Result.intoMap(Class)
,DefaultRecordMapper
-
fetchMap
<K,V> Map<K,V> fetchMap(Class<? extends K> keyType, Class<? extends V> valueType) throws DataAccessException, MappingException, InvalidResultException
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(Class, Class)
instead, if your keys are non-unique.- Parameters:
keyType
- The key type. If this isnull
, the resulting map will contain at most one entry.valueType
- The value type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping recordsInvalidResultException
- if the key list is non-unique in the result set.DataAccessException
- See Also:
Result.intoMap(Class, Class)
,DefaultRecordMapper
-
fetchMap
<K,V> Map<K,V> fetchMap(Class<? extends K> keyType, RecordMapper<? super R,V> valueMapper) throws DataAccessException, InvalidResultException, MappingException
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(Class, RecordMapper)
instead, if your keys are non-unique.- Parameters:
keyType
- The key type. If this isnull
, the resulting map will contain at most one entry.valueMapper
- The value mapper.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping recordsInvalidResultException
- if the key list is non-unique in the result set.DataAccessException
- See Also:
Result.intoMap(Class, RecordMapper)
,DefaultRecordMapper
-
fetchMap
<K> Map<K,R> fetchMap(RecordMapper<? super R,K> keyMapper) throws DataAccessException, InvalidResultException, MappingException
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(RecordMapper)
instead, if your keys are non-unique.- Parameters:
keyMapper
- The key mapper.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping recordsInvalidResultException
- if the key list is non-unique in the result set.DataAccessException
- See Also:
Result.intoMap(RecordMapper)
,DefaultRecordMapper
-
fetchMap
<K,V> Map<K,V> fetchMap(RecordMapper<? super R,K> keyMapper, Class<V> valueType) throws DataAccessException, InvalidResultException, MappingException
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(RecordMapper, Class)
instead, if your keys are non-unique.- Parameters:
keyMapper
- The key mapper.valueType
- The value type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping recordsInvalidResultException
- if the key list is non-unique in the result set.DataAccessException
- See Also:
Result.intoMap(RecordMapper, Class)
,DefaultRecordMapper
-
fetchMap
<K,V> Map<K,V> fetchMap(RecordMapper<? super R,K> keyMapper, RecordMapper<? super R,V> valueMapper) throws DataAccessException, InvalidResultException, MappingException
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(RecordMapper, RecordMapper)
instead, if your keys are non-unique.- Parameters:
keyMapper
- The key mapper.valueMapper
- The value mapper.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping recordsInvalidResultException
- if the key list is non-unique in the result set.DataAccessException
- See Also:
Result.intoMap(RecordMapper, RecordMapper)
,DefaultRecordMapper
-
fetchMap
<S extends Record> Map<S,R> fetchMap(Table<S> table) throws DataAccessException
Execute the query and return aMap
with table as a map key and the corresponding record as value.An
InvalidResultException
is thrown, if the keys turn out to be non-unique in the result set. UsefetchGroups(Table)
instead, if your keys are non-unique.- Parameters:
table
- The key table. Client code must assure that keys are unique in the result set. May not benull
.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key list is non-unique in the result set.- See Also:
Result.intoMap(Table)
-
fetchMap
<S extends Record,T extends Record> Map<S,T> fetchMap(Table<S> keyTable, Table<T> valueTable) throws DataAccessException
Execute the query and return aMap
with table as a map key and the corresponding record as value.An
InvalidResultException
is thrown, if the keys turn out to be non-unique in the result set. UsefetchGroups(Table, Table)
instead, if your keys are non-unique.- Parameters:
keyTable
- The key table. Client code must assure that keys are unique in the result set. May not benull
.valueTable
- The value table. May not benull
.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key list is non-unique in the result set.- See Also:
Result.intoMap(Table, Table)
-
fetchMap
<E,S extends Record> Map<S,E> fetchMap(Table<S> table, Class<? extends E> type) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given table and mapped into the given entity type.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(Table, Class)
instead, if your keys are non-unique.- Parameters:
table
- The key table. Client code must assure that keys are unique in the result set. May not benull
.type
- The entity type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the keys are non-unique in the result set.MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoMap(Table, Class)
,DefaultRecordMapper
-
fetchMap
<E,S extends Record> Map<S,E> fetchMap(Table<S> table, RecordMapper<? super R,E> mapper) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given table and mapped by the given mapper.An
InvalidResultException
is thrown, if the keys are non-unique in the result set. UsefetchGroups(Table, RecordMapper)
instead, if your keys are non-unique.- Parameters:
table
- The key table. Client code must assure that keys are unique in the result set. May not benull
.mapper
- The mapper callback.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the keys are non-unique in the result set.MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoMap(Table, Class)
,DefaultRecordMapper
-
fetchMap
<K,E> Map<K,E> fetchMap(Field<K> key, Class<? extends E> type) throws DataAccessException
Execute the query and return aMap
with results grouped by the given key and mapped into the given entity type.An exception is thrown, if the key turn out to be non-unique in the result set. Use
fetchGroups(Field, Class)
instead, if your key is non-unique.- Parameters:
key
- The key. Client code must assure that key is unique in the result set.type
- The entity type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key is non-unique in the result set.- See Also:
Result.intoMap(Field, Class)
-
fetchMap
<E> Map<?,E> fetchMap(int keyFieldIndex, Class<? extends E> type) throws DataAccessException
Execute the query and return aMap
with results grouped by the given key and mapped into the given entity type.An exception is thrown, if the key turn out to be non-unique in the result set. Use
fetchGroups(int, Class)
instead, if your key is non-unique.- Parameters:
keyFieldIndex
- The key. Client code must assure that key is unique in the result set.type
- The entity type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key is non-unique in the result set.- See Also:
Result.intoMap(int, Class)
-
fetchMap
<E> Map<?,E> fetchMap(String keyFieldName, Class<? extends E> type) throws DataAccessException
Execute the query and return aMap
with results grouped by the given key and mapped into the given entity type.An exception is thrown, if the key turn out to be non-unique in the result set. Use
fetchGroups(String, Class)
instead, if your key is non-unique.- Parameters:
keyFieldName
- The key. Client code must assure that key is unique in the result set.type
- The entity type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key is non-unique in the result set.- See Also:
Result.intoMap(String, Class)
-
fetchMap
<E> Map<?,E> fetchMap(Name keyFieldName, Class<? extends E> type) throws DataAccessException
Execute the query and return aMap
with results grouped by the given key and mapped into the given entity type.An exception is thrown, if the key turn out to be non-unique in the result set. Use
fetchGroups(Name, Class)
instead, if your key is non-unique.- Parameters:
keyFieldName
- The key. Client code must assure that key is unique in the result set.type
- The entity type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key is non-unique in the result set.- See Also:
Result.intoMap(Name, Class)
-
fetchMap
<K,E> Map<K,E> fetchMap(Field<K> key, RecordMapper<? super R,E> mapper) throws DataAccessException
Execute the query and return aMap
with results grouped by the given key and mapped by the given mapper.An exception is thrown, if the key turn out to be non-unique in the result set. Use
fetchGroups(Field, Class)
instead, if your key is non-unique.- Parameters:
key
- The key. Client code must assure that key is unique in the result set.mapper
- The mapper callback.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key is non-unique in the result set.- See Also:
Result.intoMap(Field, Class)
-
fetchMap
<E> Map<?,E> fetchMap(int keyFieldIndex, RecordMapper<? super R,E> mapper) throws DataAccessException
Execute the query and return aMap
with results grouped by the given key and mapped by the given mapper.An exception is thrown, if the key turn out to be non-unique in the result set. Use
fetchGroups(int, Class)
instead, if your key is non-unique.- Parameters:
keyFieldIndex
- The key. Client code must assure that key is unique in the result set.mapper
- The mapper callback.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key is non-unique in the result set.- See Also:
Result.intoMap(int, Class)
-
fetchMap
<E> Map<?,E> fetchMap(String keyFieldName, RecordMapper<? super R,E> mapper) throws DataAccessException
Execute the query and return aMap
with results grouped by the given key and mapped by the given mapper.An exception is thrown, if the key turn out to be non-unique in the result set. Use
fetchGroups(String, Class)
instead, if your key is non-unique.- Parameters:
keyFieldName
- The key. Client code must assure that key is unique in the result set.mapper
- The mapper callback.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key is non-unique in the result set.- See Also:
Result.intoMap(String, Class)
-
fetchMap
<E> Map<?,E> fetchMap(Name keyFieldName, RecordMapper<? super R,E> mapper) throws DataAccessException
Execute the query and return aMap
with results grouped by the given key and mapped by the given mapper.An exception is thrown, if the key turn out to be non-unique in the result set. Use
fetchGroups(Name, Class)
instead, if your key is non-unique.- Parameters:
keyFieldName
- The key. Client code must assure that key is unique in the result set.mapper
- The mapper callback.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryInvalidResultException
- if the key is non-unique in the result set.- See Also:
Result.intoMap(Name, Class)
-
fetchGroups
<K> Map<K,Result<R>> fetchGroups(Field<K> key) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and a list of corresponding records as value.Unlike
fetchMap(Field)
, this method allows for non-unique keys in the result set.The resulting records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Type Parameters:
K
- The key's generic field type- Parameters:
key
- The key field.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(Field)
-
fetchGroups
Map<?,Result<R>> fetchGroups(int keyFieldIndex) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and a list of corresponding records as value.Unlike
fetchMap(int)
, this method allows for non-unique keys in the result set.The resulting records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Parameters:
keyFieldIndex
- The key field index.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(int)
-
fetchGroups
Map<?,Result<R>> fetchGroups(String keyFieldName) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and a list of corresponding records as value.Unlike
fetchMap(String)
, this method allows for non-unique keys in the result set.The resulting records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Parameters:
keyFieldName
- The key field name.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(String)
-
fetchGroups
Map<?,Result<R>> fetchGroups(Name keyFieldName) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and a list of corresponding records as value.Unlike
fetchMap(Name)
, this method allows for non-unique keys in the result set.The resulting records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Parameters:
keyFieldName
- The key field name.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(Name)
-
fetchGroups
<K,V> Map<K,List<V>> fetchGroups(Field<K> key, Field<V> value) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as valueUnlike
fetchMap(Field, Field)
, this method allows for non-unique keys in the result set.- Type Parameters:
K
- The key's generic field typeV
- The value's generic field type- Parameters:
key
- The key field.value
- The value field- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(Field, Field)
-
fetchGroups
Map<?,List<?>> fetchGroups(int keyFieldIndex, int valueFieldIndex) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as valueUnlike
fetchMap(int, int)
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldIndex
- The key field index.valueFieldIndex
- The value field index.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(int, int)
-
fetchGroups
Map<?,List<?>> fetchGroups(String keyFieldName, String valueFieldName) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as valueUnlike
fetchMap(String, String)
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldName
- The key field name.valueFieldName
- The value field name.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(String, String)
-
fetchGroups
Map<?,List<?>> fetchGroups(Name keyFieldName, Name valueFieldName) throws DataAccessException
Execute the query and return aMap
with one of the result's columns as key and another one of the result's columns as valueUnlike
fetchMap(Name, Name)
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldName
- The key field name.valueFieldName
- The value field name.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(Name, Name)
-
fetchGroups
Map<Record,Result<R>> fetchGroups(Field<?>[] keys) throws DataAccessException
Execute the query and return aMap
with the result grouped by the given keys.Unlike
fetchMap(Field[])
, this method allows for non-unique keys in the result set.- Parameters:
keys
- The keys used for result grouping. If this isnull
or an empty array, the resulting map will contain at most one entry.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(Field[])
-
fetchGroups
Map<Record,Result<R>> fetchGroups(int[] keyFieldIndexes) throws DataAccessException
Execute the query and return aMap
with the result grouped by the given keys.Unlike
fetchMap(int[])
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldIndexes
- The keys used for result grouping. If this isnull
or an empty array, the resulting map will contain at most one entry.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(int[])
-
fetchGroups
Map<Record,Result<R>> fetchGroups(String[] keyFieldNames) throws DataAccessException
Execute the query and return aMap
with the result grouped by the given keys.Unlike
fetchMap(String[])
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldNames
- The keys used for result grouping. If this isnull
or an empty array, the resulting map will contain at most one entry.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(String[])
-
fetchGroups
Map<Record,Result<R>> fetchGroups(Name[] keyFieldNames) throws DataAccessException
Execute the query and return aMap
with the result grouped by the given keys.Unlike
fetchMap(Name[])
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldNames
- The keys used for result grouping. If this isnull
or an empty array, the resulting map will contain at most one entry.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(Name[])
-
fetchGroups
Map<Record,Result<Record>> fetchGroups(Field<?>[] keys, Field<?>[] values) throws DataAccessException
Execute the query and return aMap
with the result grouped by the given keys.Unlike
fetchMap(Field[], Field[])
, this method allows for non-unique keys in the result set.- Parameters:
keys
- The keys used for result grouping. If this isnull
or an empty array, the resulting map will contain at most one entry.values
- The values.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(Field[], Field[])
-
fetchGroups
Map<Record,Result<Record>> fetchGroups(int[] keyFieldIndexes, int[] valueFieldIndexes) throws DataAccessException
Execute the query and return aMap
with the result grouped by the given keys.Unlike
fetchMap(int[], int[])
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldIndexes
- The keys used for result grouping. If this isnull
or an empty array, the resulting map will contain at most one entry.valueFieldIndexes
- The values.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(int[], int[])
-
fetchGroups
Map<Record,Result<Record>> fetchGroups(String[] keyFieldNames, String[] valueFieldNames) throws DataAccessException
Execute the query and return aMap
with the result grouped by the given keys.Unlike
fetchMap(String[], String[])
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldNames
- The keys used for result grouping. If this isnull
or an empty array, the resulting map will contain at most one entry.valueFieldNames
- The values.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(String[], String[])
-
fetchGroups
Map<Record,Result<Record>> fetchGroups(Name[] keyFieldNames, Name[] valueFieldNames) throws DataAccessException
Execute the query and return aMap
with the result grouped by the given keys.Unlike
fetchMap(Name[], Name[])
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldNames
- The keys used for result grouping. If this isnull
or an empty array, the resulting map will contain at most one entry.valueFieldNames
- The values returned per group.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(Name[], Name[])
-
fetchGroups
<E> Map<Record,List<E>> fetchGroups(Field<?>[] keys, Class<? extends E> type) throws MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.Unlike
fetchMap(Field[], Class)
, this method allows for non-unique keys in the result set.- Parameters:
keys
- The keys. If this isnull
or an empty array, the resulting map will contain at most one entry.type
- The entity type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(Field[], Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<Record,List<E>> fetchGroups(int[] keyFieldIndexes, Class<? extends E> type) throws MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.Unlike
fetchMap(int[], Class)
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldIndexes
- The keys. If this isnull
or an empty array, the resulting map will contain at most one entry.type
- The entity type.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(int[], Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<Record,List<E>> fetchGroups(String[] keyFieldNames, Class<? extends E> type) throws MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.Unlike
fetchMap(String[], Class)
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldNames
- The keys. If this isnull
or an empty array, the resulting map will contain at most one entry.type
- The entity type.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(String[], Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<Record,List<E>> fetchGroups(Name[] keyFieldNames, Class<? extends E> type) throws MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped into the given entity type.Unlike
fetchMap(Name[], Class)
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldNames
- The keys. If this isnull
or an empty array, the resulting map will contain at most one entry.type
- The entity type.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(Name[], Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<Record,List<E>> fetchGroups(Field<?>[] keys, RecordMapper<? super R,E> mapper) throws MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.Unlike
fetchMap(Field[], RecordMapper)
, this method allows for non-unique keys in the result set.- Parameters:
keys
- The keys. If this isnull
or an empty array, the resulting map will contain at most one entry.mapper
- The mapper callback.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(Field[], Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<Record,List<E>> fetchGroups(int[] keyFieldIndexes, RecordMapper<? super R,E> mapper) throws MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.Unlike
fetchMap(int[], RecordMapper)
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldIndexes
- The keys. If this isnull
or an empty array, the resulting map will contain at most one entry.mapper
- The mapper callback.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(int[], Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<Record,List<E>> fetchGroups(String[] keyFieldNames, RecordMapper<? super R,E> mapper) throws MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.Unlike
fetchMap(String[], RecordMapper)
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldNames
- The keys. If this isnull
or an empty array, the resulting map will contain at most one entry.mapper
- The mapper callback.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(String[], Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<Record,List<E>> fetchGroups(Name[] keyFieldNames, RecordMapper<? super R,E> mapper) throws MappingException
Execute the query and return aMap
with results grouped by the given keys and mapped by the given mapper.Unlike
fetchMap(Name[], RecordMapper)
, this method allows for non-unique keys in the result set.- Parameters:
keyFieldNames
- The keys. If this isnull
or an empty array, the resulting map will contain at most one entry.mapper
- The mapper callback.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(Name[], Class)
,DefaultRecordMapper
-
fetchGroups
<K> Map<K,Result<R>> fetchGroups(Class<? extends K> keyType) throws MappingException
Execute the query and return aMap
with results grouped by the given key entity.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.Unlike
fetchMap(Class)
, this method allows for non-unique keys in the result set.- Parameters:
keyType
- The key type. If this isnull
, the resulting map will contain at most one entry.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
DefaultRecordMapper
-
fetchGroups
<K,V> Map<K,List<V>> fetchGroups(Class<? extends K> keyType, Class<? extends V> valueType) throws MappingException
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.Unlike
fetchMap(Class, Class)
, this method allows for non-unique keys in the result set.- Parameters:
keyType
- The key type. If this isnull
, the resulting map will contain at most one entry.valueType
- The value type.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
DefaultRecordMapper
-
fetchGroups
<K,V> Map<K,List<V>> fetchGroups(Class<? extends K> keyType, RecordMapper<? super R,V> valueMapper) throws MappingException
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.Unlike
fetchMap(Class, RecordMapper)
, this method allows for non-unique keys in the result set.- Parameters:
keyType
- The key type. If this isnull
, the resulting map will contain at most one entry.valueMapper
- The value mapper.- Returns:
- A Map containing grouped results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
DefaultRecordMapper
-
fetchGroups
<K> Map<K,Result<R>> fetchGroups(RecordMapper<? super R,K> keyMapper) throws MappingException
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.Unlike
fetchMap(RecordMapper, RecordMapper)
, this method allows for non-unique keys in the result set.- Parameters:
keyMapper
- The key mapper.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
DefaultRecordMapper
-
fetchGroups
<K,V> Map<K,List<V>> fetchGroups(RecordMapper<? super R,K> keyMapper, Class<V> valueType) throws MappingException
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.Unlike
fetchMap(RecordMapper, Class)
, this method allows for non-unique keys in the result set.- Parameters:
keyMapper
- The key mapper.valueType
- The value type.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
DefaultRecordMapper
-
fetchGroups
<K,V> Map<K,List<V>> fetchGroups(RecordMapper<? super R,K> keyMapper, RecordMapper<? super R,V> valueMapper) throws MappingException
Execute the query and return aMap
with results grouped by the given key entity and mapped into the given entity type.The grouping semantics is governed by the key type's
Object.equals(Object)
andObject.hashCode()
implementation, not necessarily the values as fetched from the database.Unlike
fetchMap(RecordMapper, RecordMapper)
, this method allows for non-unique keys in the result set.- Parameters:
keyMapper
- The key mapper.valueMapper
- The value mapper.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
MappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
DefaultRecordMapper
-
fetchGroups
<S extends Record> Map<S,Result<R>> fetchGroups(Table<S> table) throws DataAccessException
Execute the query and return aMap
with the result grouped by the given table.Unlike
fetchMap(Table)
, this method allows for non-unique keys in the result set.- Parameters:
table
- The key table. May not benull
.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(Table)
-
fetchGroups
<S extends Record,T extends Record> Map<S,Result<T>> fetchGroups(Table<S> keyTable, Table<T> valueTable) throws DataAccessException
Execute the query and return aMap
with the result grouped by the given table.Unlike
fetchMap(Table, Table)
, this method allows for non-unique keys in the result set.- Parameters:
keyTable
- The key table. May not benull
.valueTable
- The value table. May not benull
.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoGroups(Table, Table)
-
fetchGroups
<E,S extends Record> Map<S,List<E>> fetchGroups(Table<S> table, Class<? extends E> type) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given table and mapped into the given entity type.Unlike
fetchMap(Table, Class)
, this method allows for non-unique keys in the result set.- Parameters:
table
- The key table. May not benull
.type
- The entity type.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(Table, Class)
,DefaultRecordMapper
-
fetchGroups
<E,S extends Record> Map<S,List<E>> fetchGroups(Table<S> table, RecordMapper<? super R,E> mapper) throws DataAccessException, MappingException
Execute the query and return aMap
with results grouped by the given table and mapped by the given mapper.Unlike
fetchMap(Table, RecordMapper)
, this method allows for non-unique keys in the result set.- Parameters:
table
- The key table. May not benull
.mapper
- The mapper callback.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(Table, Class)
,DefaultRecordMapper
-
fetchGroups
<K,E> Map<K,List<E>> fetchGroups(Field<K> key, Class<? extends E> type) throws DataAccessException, MappingException
Return aMap
with results grouped by the given key and mapped into the given entity type.- Type Parameters:
K
- The key's generic field typeE
- The generic entity type.- Parameters:
key
- The key field.type
- The entity type.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(Field, Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<?,List<E>> fetchGroups(int keyFieldIndex, Class<? extends E> type) throws DataAccessException, MappingException
Return aMap
with results grouped by the given key and mapped into the given entity type.- Parameters:
keyFieldIndex
- The key field index.type
- The entity type.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(int, Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<?,List<E>> fetchGroups(String keyFieldName, Class<? extends E> type) throws DataAccessException, MappingException
Return aMap
with results grouped by the given key and mapped into the given entity type.- Parameters:
keyFieldName
- The key field name.type
- The entity type.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(String, Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<?,List<E>> fetchGroups(Name keyFieldName, Class<? extends E> type) throws DataAccessException, MappingException
Return aMap
with results grouped by the given key and mapped into the given entity type.- Parameters:
keyFieldName
- The key field name.type
- The entity type.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(Name, Class)
,DefaultRecordMapper
-
fetchGroups
<K,E> Map<K,List<E>> fetchGroups(Field<K> key, RecordMapper<? super R,E> mapper) throws DataAccessException, MappingException
Return aMap
with results grouped by the given key and mapped by the given mapper.- Type Parameters:
K
- The key's generic field typeE
- The generic entity type.- Parameters:
key
- The key field.mapper
- The mapper callback.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(Field, Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<?,List<E>> fetchGroups(int keyFieldIndex, RecordMapper<? super R,E> mapper) throws DataAccessException, MappingException
Return aMap
with results grouped by the given key and mapped by the given mapper.- Parameters:
keyFieldIndex
- The key field index.mapper
- The mapper callback.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(int, Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<?,List<E>> fetchGroups(String keyFieldName, RecordMapper<? super R,E> mapper) throws DataAccessException, MappingException
Return aMap
with results grouped by the given key and mapped by the given mapper.- Parameters:
keyFieldName
- The key field name.mapper
- The mapper callback.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(String, Class)
,DefaultRecordMapper
-
fetchGroups
<E> Map<?,List<E>> fetchGroups(Name keyFieldName, RecordMapper<? super R,E> mapper) throws DataAccessException, MappingException
Return aMap
with results grouped by the given key and mapped by the given mapper.- Parameters:
keyFieldName
- The key field name.mapper
- The mapper callback.- Returns:
- A Map containing the results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Result.intoGroups(Name, Class)
,DefaultRecordMapper
-
fetchArrays
Object[][] fetchArrays() throws DataAccessException
Execute the query and return the generated result as an Object matrix.You can access data like this
query.fetchArray()[recordIndex][fieldIndex]
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArrays()
-
fetchArray
R[] fetchArray() throws DataAccessException
Execute the query and return the generated result as an array of records.- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
List.toArray(Object[])
-
fetchArray
Object[] fetchArray(int fieldIndex) throws DataAccessException
Execute the query and return all values for a field index from the generated result.You can access data like this
query.fetchArray(fieldIndex)[recordIndex]
- Returns:
- The resulting values. This may be an array type more concrete
than
Object[]
, depending on whether jOOQ has any knowledge aboutfieldIndex
's actual type. This will never benull
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(int)
-
fetchArray
<T> T[] fetchArray(int fieldIndex, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field index from the generated result.You can access data like this
query.fetchArray(fieldIndex)[recordIndex]
- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(int, Class)
-
fetchArray
<U> U[] fetchArray(int fieldIndex, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field index from the generated result.You can access data like this
query.fetchArray(fieldIndex)[recordIndex]
- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(int, Converter)
-
fetchArray
Object[] fetchArray(String fieldName) throws DataAccessException
Execute the query and return all values for a field name from the generated result.You can access data like this
query.fetchArray(fieldName)[recordIndex]
- Returns:
- The resulting values. This may be an array type more concrete
than
Object[]
, depending on whether jOOQ has any knowledge aboutfieldName
's actual type. This will never benull
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(String)
-
fetchArray
<T> T[] fetchArray(String fieldName, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field name from the generated result.You can access data like this
query.fetchArray(fieldName)[recordIndex]
- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(String, Converter)
-
fetchArray
<U> U[] fetchArray(String fieldName, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field name from the generated result.You can access data like this
query.fetchArray(fieldName)[recordIndex]
- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(String, Class)
-
fetchArray
Object[] fetchArray(Name fieldName) throws DataAccessException
Execute the query and return all values for a field name from the generated result.You can access data like this
query.fetchArray(fieldName)[recordIndex]
- Returns:
- The resulting values. This may be an array type more concrete
than
Object[]
, depending on whether jOOQ has any knowledge aboutfieldName
's actual type. This will never benull
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Name)
-
fetchArray
<T> T[] fetchArray(Name fieldName, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field name from the generated result.You can access data like this
query.fetchArray(fieldName)[recordIndex]
- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Name, Converter)
-
fetchArray
<U> U[] fetchArray(Name fieldName, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field name from the generated result.You can access data like this
query.fetchArray(fieldName)[recordIndex]
- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Name, Class)
-
fetchArray
<T> T[] fetchArray(Field<T> field) throws DataAccessException
Execute the query and return all values for a field from the generated result.You can access data like this
query.fetchArray(field)[recordIndex]
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Field)
-
fetchArray
<T> T[] fetchArray(Field<?> field, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field from the generated result.You can access data like this
query.fetchArray(field)[recordIndex]
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Field, Class)
-
fetchArray
<T,U> U[] fetchArray(Field<T> field, Converter<? super T,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field from the generated result.You can access data like this
query.fetchArray(field)[recordIndex]
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Field, Converter)
-
fetchSet
<E> Set<E> fetchSet(RecordMapper<? super R,E> mapper) throws DataAccessException
Fetch results into a custom mapper callback.- Parameters:
mapper
- The mapper callback- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchSet
Set<?> fetchSet(int fieldIndex) throws DataAccessException
Execute the query and return all values for a field index from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(int)
-
fetchSet
<T> Set<T> fetchSet(int fieldIndex, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field index from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(int, Class)
-
fetchSet
<U> Set<U> fetchSet(int fieldIndex, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field index from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(int, Converter)
-
fetchSet
Set<?> fetchSet(String fieldName) throws DataAccessException
Execute the query and return all values for a field name from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(String)
-
fetchSet
<T> Set<T> fetchSet(String fieldName, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field name from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(String, Converter)
-
fetchSet
<U> Set<U> fetchSet(String fieldName, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field name from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(String, Class)
-
fetchSet
Set<?> fetchSet(Name fieldName) throws DataAccessException
Execute the query and return all values for a field name from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Name)
-
fetchSet
<T> Set<T> fetchSet(Name fieldName, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field name from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Name, Converter)
-
fetchSet
<U> Set<U> fetchSet(Name fieldName, Converter<?,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field name from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Name, Class)
-
fetchSet
<T> Set<T> fetchSet(Field<T> field) throws DataAccessException
Execute the query and return all values for a field from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Field)
-
fetchSet
<T> Set<T> fetchSet(Field<?> field, Class<? extends T> type) throws DataAccessException
Execute the query and return all values for a field from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Field, Class)
-
fetchSet
<T,U> Set<U> fetchSet(Field<T> field, Converter<? super T,? extends U> converter) throws DataAccessException
Execute the query and return all values for a field from the generated result.- Returns:
- The resulting values. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Field, Converter)
-
fetchInto
<E> List<E> fetchInto(Class<? extends E> type) throws DataAccessException, MappingException
Map resulting records onto a custom type.This is the same as calling
fetch().into(type)
. SeeRecord.into(Class)
for more details- Type Parameters:
E
- The generic entity type.- Parameters:
type
- The entity type.- Returns:
- The results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the queryMappingException
- wrapping any reflection or data type conversion exception that might have occurred while mapping records- See Also:
Record.into(Class)
,Result.into(Class)
,DefaultRecordMapper
-
fetchInto
<Z extends Record> Result<Z> fetchInto(Table<Z> table) throws DataAccessException
Map resulting records onto a custom record.This is the same as calling
fetch().into(table)
. SeeRecord.into(Table)
for more detailsThe result and its contained records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Type Parameters:
Z
- The generic table record type.- Parameters:
table
- The table type.- Returns:
- The results. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.into(Table)
,Result.into(Table)
-
fetchInto
<H extends RecordHandler<? super R>> H fetchInto(H handler) throws DataAccessException
Fetch results into a custom handler callback.The resulting records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Parameters:
handler
- The handler callback- Returns:
- Convenience result, returning the parameter handler itself
- Throws:
DataAccessException
- if something went wrong executing the query
-
fetch
<E> List<E> fetch(RecordMapper<? super R,E> mapper) throws DataAccessException
Fetch results into a custom mapper callback.- Parameters:
mapper
- The mapper callback- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAsync
CompletionStage<Result<R>> fetchAsync()
Fetch results in a newCompletionStage
.The result is asynchronously completed by a task running in an
Executor
provided by the underlyingConfiguration.executorProvider()
.- Returns:
- The completion stage. The completed result will never be
null
.
-
fetchAsync
CompletionStage<Result<R>> fetchAsync(Executor executor)
Fetch results in a newCompletionStage
that is asynchronously completed by a task running in the given executor.- Returns:
- The completion stage. The completed result will never be
null
.
-
fetchLater
@Deprecated FutureResult<R> fetchLater() throws DataAccessException
Deprecated.- 3.2.0 - [#2581] - This method will be removed in jOOQ 4.0Fetch results asynchronously.This method wraps fetching of records in a
Future
, such that you can access the actual records at a future instant. This is especially useful when- You want to load heavy data in the background, for instance when the user logs in and accesses a pre-calculated dashboard screen, before they access the heavy data.
- You want to parallelise several independent OLAP queries before merging all data into a single report
- ...
This will internally create a "single thread executor", that is shut down at the end of the
FutureResult
's lifecycle. UsefetchLater(ExecutorService)
instead, if you want control over your executing threads.The result and its contained records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Returns:
- A future result
- Throws:
DataAccessException
- if something went wrong executing the query
-
fetchLater
@Deprecated FutureResult<R> fetchLater(ExecutorService executor) throws DataAccessException
Deprecated.- 3.2.0 - [#2581] - This method will be removed in jOOQ 4.0Fetch results asynchronously.This method wraps fetching of records in a
Future
, such that you can access the actual records at a future instant. This is especially useful when- You want to load heavy data in the background, for instance when the user logs in and accesses a pre-calculated dashboard screen, before they access the heavy data.
- You want to parallelise several independent OLAP queries before merging all data into a single report
- ...
Use this method rather than
fetchLater()
, in order to keep control over thread lifecycles, if you manage threads in a J2EE container or with Spring, for instance.The result and its contained records are attached to the original
Configuration
by default. UseSettings.isAttachRecords()
to override this behaviour.- Parameters:
executor
- A custom executor- Returns:
- A future result
- Throws:
DataAccessException
- if something went wrong executing the query
-
bind
ResultQuery<R> bind(String param, Object value) throws IllegalArgumentException, DataTypeException
Description copied from interface:Query
Bind a new value to a named parameter.[#1886] If the bind value with name
param
is inlined (Param.isInline()
) or if this query was created withStatementType.STATIC_STATEMENT
and there is an underlyingPreparedStatement
kept open because ofQuery.keepStatement(boolean)
, the underlyingPreparedStatement
will be closed automatically in order for new bind values to have an effect.- Specified by:
bind
in interfaceQuery
- Parameters:
param
- The named parameter name. If this is a number, then this is the same as callingQuery.bind(int, Object)
value
- The new bind value.- Throws:
IllegalArgumentException
- if there is no parameter by the given parameter name or index.DataTypeException
- ifvalue
cannot be converted into the parameter's data type
-
bind
ResultQuery<R> bind(int index, Object value) throws IllegalArgumentException, DataTypeException
Description copied from interface:Query
Bind a new value to an indexed parameter.[#1886] If the bind value at
index
is inlined (Param.isInline()
) or if this query was created withStatementType.STATIC_STATEMENT
and there is an underlyingPreparedStatement
kept open because ofQuery.keepStatement(boolean)
, the underlyingPreparedStatement
will be closed automatically in order for new bind values to have an effect.- Specified by:
bind
in interfaceQuery
- Parameters:
index
- The parameter index, starting with 1value
- The new bind value.- Throws:
IllegalArgumentException
- if there is no parameter by the given parameter index.DataTypeException
- ifvalue
cannot be converted into the parameter's data type
-
poolable
ResultQuery<R> poolable(boolean poolable)
Description copied from interface:Query
Specify whether any JDBCStatement
created by this query should beStatement.setPoolable(boolean)
.If this method is not called on jOOQ types, then jOOQ will not specify the flag on JDBC either, resulting in JDBC's default behaviour.
- Specified by:
poolable
in interfaceQuery
- See Also:
Statement.setPoolable(boolean)
-
queryTimeout
ResultQuery<R> queryTimeout(int timeout)
Description copied from interface:Query
Specify the query timeout in number of seconds for the underlying JDBCStatement
.- Specified by:
queryTimeout
in interfaceQuery
- See Also:
Statement.setQueryTimeout(int)
-
keepStatement
ResultQuery<R> keepStatement(boolean keepStatement)
Description copied from interface:Query
Keep the query's underlying statement open after execution.This indicates to jOOQ that the query's underlying
Statement
orPreparedStatement
should be kept open after execution. If it is kept open, client code is responsible for properly closing it usingQuery.close()
- Specified by:
keepStatement
in interfaceQuery
- Parameters:
keepStatement
- Whether to keep the underlying statement open
-
maxRows
ResultQuery<R> maxRows(int rows)
Specify the maximum number of rows returned by the underlyingStatement
.This is not the same as setting a
LIMIT .. OFFSET
clause onto the statement, where the result set is restricted within the database.- See Also:
Statement.setMaxRows(int)
-
fetchSize
ResultQuery<R> fetchSize(int rows)
Specify the fetch size of the underlyingStatement
.Regardless of this setting,
fetchLazy()
is the only way in jOOQ not to fetch all data in memory. However, you may influence how your JDBC driver interacts with your database through specifying a fetch size.Dialect-specific remarks:
- MySQL uses
Integer.MIN_VALUE
as an indicator to fetch resulting rows row-by-row in conjunction withResultSet.TYPE_FORWARD_ONLY
(set inresultSetType(int)
) andResultSet.CONCUR_READ_ONLY
(set inresultSetConcurrency(int)
). See this page here for details. - PostgreSQL does not like fetch sizes being combined with
. For more information, see this page hereConnection.getAutoCommit()
== true
- See Also:
Statement.setFetchSize(int)
- MySQL uses
-
resultSetConcurrency
ResultQuery<R> resultSetConcurrency(int resultSetConcurrency)
Specify theResultSet
concurrency ofResultSet
objects created by jOOQ.This will affect the way you may perceive
ResultSet
objects obtained from any of these methods:- See Also:
Statement.getResultSetConcurrency()
-
resultSetType
ResultQuery<R> resultSetType(int resultSetType)
Specify theResultSet
type ofResultSet
objects created by jOOQ.This will affect the way you may perceive
ResultSet
objects obtained from any of these methods:- See Also:
Statement.getResultSetType()
-
resultSetHoldability
ResultQuery<R> resultSetHoldability(int resultSetHoldability)
Specify theResultSet
holdability ofResultSet
objects created by jOOQ.This will affect the way you may perceive
ResultSet
objects obtained from any of these methods:- See Also:
Statement.getResultSetHoldability()
-
intern
@Deprecated ResultQuery<R> intern(Field<?>... fields)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0Specify a set of fields whose values should be interned.Unlike
Result
'sintern()
methods, this already interns values right after fetching them from a JDBC result set. SeeResult.intern(int...)
for more details.- Parameters:
fields
- The fields whose values should be interned- Returns:
- The same result query
- See Also:
Result.intern(Field...)
,String.intern()
-
intern
@Deprecated ResultQuery<R> intern(int... fieldIndexes)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0Specify a set of field indexes whose values should be interned.Unlike
Result
'sintern()
methods, this already interns values right after fetching them from a JDBC result set. SeeResult.intern(int...)
for more details.- Parameters:
fieldIndexes
- The field indexes whose values should be interned- Returns:
- The same result query
- See Also:
Result.intern(int...)
,String.intern()
-
intern
@Deprecated ResultQuery<R> intern(String... fieldNames)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0Specify a set of field names whose values should be interned.Unlike
Result
'sintern()
methods, this already interns values right after fetching them from a JDBC result set. SeeResult.intern(String...)
for more details.- Parameters:
fieldNames
- The field names whose values should be interned- Returns:
- The same result query
- See Also:
Result.intern(String...)
,String.intern()
-
intern
@Deprecated ResultQuery<R> intern(Name... fieldNames)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0Specify a set of field names whose values should be interned.Unlike
Result
'sintern()
methods, this already interns values right after fetching them from a JDBC result set. SeeResult.intern(Name...)
for more details.- Parameters:
fieldNames
- The field names whose values should be interned- Returns:
- The same result query
- See Also:
Result.intern(Name...)
,String.intern()
-
coerce
<X extends Record> ResultQuery<X> coerce(Table<X> table)
Coerce the result record type of this query to that of a table.
-
coerce
ResultQuery<Record> coerce(Field<?>... fields)
Coerce the result record type of this query to that of a set of fields.
-
coerce
ResultQuery<Record> coerce(Collection<? extends Field<?>> fields)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1> ResultQuery<Record1<T1>> coerce(Field<T1> field1)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2> ResultQuery<Record2<T1,T2>> coerce(Field<T1> field1, Field<T2> field2)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3> ResultQuery<Record3<T1,T2,T3>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4> ResultQuery<Record4<T1,T2,T3,T4>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5> ResultQuery<Record5<T1,T2,T3,T4,T5>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6> ResultQuery<Record6<T1,T2,T3,T4,T5,T6>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7> ResultQuery<Record7<T1,T2,T3,T4,T5,T6,T7>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8> ResultQuery<Record8<T1,T2,T3,T4,T5,T6,T7,T8>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9> ResultQuery<Record9<T1,T2,T3,T4,T5,T6,T7,T8,T9>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> ResultQuery<Record10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> ResultQuery<Record11<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> ResultQuery<Record12<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> ResultQuery<Record13<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> ResultQuery<Record14<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> ResultQuery<Record15<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> ResultQuery<Record16<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17> ResultQuery<Record17<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18> ResultQuery<Record18<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19> ResultQuery<Record19<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20> ResultQuery<Record20<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21> ResultQuery<Record21<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20, Field<T21> field21)
Coerce the result record type of this query to that of a set of fields.
-
coerce
<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22> ResultQuery<Record22<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22>> coerce(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20, Field<T21> field21, Field<T22> field22)
Coerce the result record type of this query to that of a set of fields.
-
-