-
- 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>
,SelectCorrelatedSubqueryStep<R>
,SelectDistinctOnStep<R>
,SelectFinalStep<R>
,SelectForJSONCommonDirectivesStep<R>
,SelectForStep<R>
,SelectForUpdateOfStep<R>
,SelectForUpdateStep<R>
,SelectForUpdateWaitStep<R>
,SelectForXMLCommonDirectivesStep<R>
,SelectForXMLPathDirectivesStep<R>
,SelectForXMLRawDirectivesStep<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 @NotNull ResultQuery<R>
bind(int index, Object value)
Bind a new value to an indexed parameter.@NotNull ResultQuery<R>
bind(String param, Object value)
Bind a new value to a named parameter.@NotNull ResultQuery<Record>
coerce(Collection<? extends Field<?>> fields)
Coerce the result record type of this query to that of a set of fields.@NotNull ResultQuery<Record>
coerce(Field<?>... fields)
Coerce the result record type of this query to that of a set of fields.<T1> @NotNull ResultQuery<Record1<T1>>
coerce(Field<T1> field1)
Coerce the result record type of this query to that of a set of fields.<T1,T2>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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
.@NotNull Result<R>
fetch()
Execute the query and return the generated result.@NotNull List<?>
fetch(int fieldIndex)
Execute the query and return all values for a field index from the generated result.<U> @NotNull List<U>
fetch(int fieldIndex, Class<? extends U> type)
Execute the query and return all values for a field index from the generated result.<U> @NotNull List<U>
fetch(int fieldIndex, Converter<?,? extends U> converter)
Execute the query and return all values for a field index from the generated result.@NotNull List<?>
fetch(String fieldName)
Execute the query and return all values for a field name from the generated result.<U> @NotNull List<U>
fetch(String fieldName, Class<? extends U> type)
Execute the query and return all values for a field name from the generated result.<U> @NotNull List<U>
fetch(String fieldName, Converter<?,? extends U> converter)
Execute the query and return all values for a field name from the generated result.<U> @NotNull List<U>
fetch(Field<?> field, Class<? extends U> type)
Execute the query and return all values for a field from the generated result.<T> @NotNull List<T>
fetch(Field<T> field)
Execute the query and return all values for a field from the generated result.<T,U>
@NotNull 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.@NotNull List<?>
fetch(Name fieldName)
Execute the query and return all values for a field name from the generated result.<U> @NotNull List<U>
fetch(Name fieldName, Class<? extends U> type)
Execute the query and return all values for a field name from the generated result.<U> @NotNull 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> @NotNull 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.@Nullable Object
fetchAny(int fieldIndex)
Execute the query and return at most one resulting value for a field index from the generated result.<U> U
fetchAny(int fieldIndex, Class<? extends U> 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.@Nullable Object
fetchAny(String fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<U> U
fetchAny(String fieldName, Class<? extends U> 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.<U> U
fetchAny(Field<?> field, Class<? extends U> 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.@Nullable Object
fetchAny(Name fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<U> U
fetchAny(Name fieldName, Class<? extends U> 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.@Nullable 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.@Nullable Map<String,Object>
fetchAnyMap()
Execute the query and return at most one resulting record as a name/value map.@NotNull R[]
fetchArray()
Execute the query and return the generated result as an array of records.@NotNull Object[]
fetchArray(int fieldIndex)
Execute the query and return all values for a field index from the generated result.<U> @NotNull U[]
fetchArray(int fieldIndex, Class<? extends U> type)
Execute the query and return all values for a field index from the generated result.<U> @NotNull U[]
fetchArray(int fieldIndex, Converter<?,? extends U> converter)
Execute the query and return all values for a field index from the generated result.@NotNull Object[]
fetchArray(String fieldName)
Execute the query and return all values for a field name from the generated result.<U> @NotNull U[]
fetchArray(String fieldName, Class<? extends U> type)
Execute the query and return all values for a field name from the generated result.<U> @NotNull U[]
fetchArray(String fieldName, Converter<?,? extends U> converter)
Execute the query and return all values for a field name from the generated result.<U> @NotNull U[]
fetchArray(Field<?> field, Class<? extends U> type)
Execute the query and return all values for a field from the generated result.<T> @NotNull T[]
fetchArray(Field<T> field)
Execute the query and return all values for a field from the generated result.<T,U>
@NotNull 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.@NotNull Object[]
fetchArray(Name fieldName)
Execute the query and return all values for a field name from the generated result.<U> @NotNull U[]
fetchArray(Name fieldName, Class<? extends U> type)
Execute the query and return all values for a field name from the generated result.<U> @NotNull U[]
fetchArray(Name fieldName, Converter<?,? extends U> converter)
Execute the query and return all values for a field name from the generated result.@NotNull Object[][]
fetchArrays()
Execute the query and return the generated result as an Object matrix.@NotNull CompletionStage<Result<R>>
fetchAsync()
Fetch results in a newCompletionStage
.@NotNull CompletionStage<Result<R>>
fetchAsync(Executor executor)
Fetch results in a newCompletionStage
that is asynchronously completed by a task running in the given executor.@NotNull 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.@NotNull Map<Record,Result<R>>
fetchGroups(int[] keyFieldIndexes)
Execute the query and return aMap
with the result grouped by the given keys.@NotNull Map<Record,Result<Record>>
fetchGroups(int[] keyFieldIndexes, int[] valueFieldIndexes)
Execute the query and return aMap
with the result grouped by the given keys.<E> @NotNull 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> @NotNull 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.@NotNull 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> @NotNull 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> @NotNull 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> @NotNull 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>
@NotNull 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>
@NotNull 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.@NotNull 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.@NotNull Map<Record,Result<R>>
fetchGroups(String[] keyFieldNames)
Execute the query and return aMap
with the result grouped by the given keys.<E> @NotNull 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.@NotNull Map<Record,Result<Record>>
fetchGroups(String[] keyFieldNames, String[] valueFieldNames)
Execute the query and return aMap
with the result grouped by the given keys.<E> @NotNull 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> @NotNull 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.@NotNull 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> @NotNull 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.@NotNull Map<Record,Result<R>>
fetchGroups(Field<?>[] keys)
Execute the query and return aMap
with the result grouped by the given keys.<E> @NotNull 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.@NotNull Map<Record,Result<Record>>
fetchGroups(Field<?>[] keys, Field<?>[] values)
Execute the query and return aMap
with the result grouped by the given keys.<E> @NotNull 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> @NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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.@NotNull 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.@NotNull Map<Record,Result<R>>
fetchGroups(Name[] keyFieldNames)
Execute the query and return aMap
with the result grouped by the given keys.<E> @NotNull 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.@NotNull Map<Record,Result<Record>>
fetchGroups(Name[] keyFieldNames, Name[] valueFieldNames)
Execute the query and return aMap
with the result grouped by the given keys.<E> @NotNull 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> @NotNull 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.@NotNull 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> @NotNull 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> @NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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> @NotNull List<E>
fetchInto(Class<? extends E> type)
Map resulting records onto a custom type.<Z extends Record>
@NotNull Result<Z>fetchInto(Table<Z> table)
Map resulting records onto a custom record.@NotNull FutureResult<R>
fetchLater()
Deprecated.- 3.2.0 - [#2581] - This method will be removed in jOOQ 4.0@NotNull FutureResult<R>
fetchLater(ExecutorService executor)
Deprecated.- 3.2.0 - [#2581] - This method will be removed in jOOQ 4.0@NotNull Cursor<R>
fetchLazy()
Execute the query and "lazily" return the generated result.@NotNull Cursor<R>
fetchLazy(int fetchSize)
Deprecated.- [#2811] - 3.3.0 - UsefetchSize(int)
andfetchLazy()
instead.@NotNull Results
fetchMany()
Execute a query, possibly returning several result sets.@NotNull 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.@NotNull Map<Record,R>
fetchMap(int[] keyFieldIndexes)
Execute the query and return aMap
with keys as a map key and the corresponding record as value.@NotNull 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> @NotNull 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> @NotNull 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.@NotNull 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> @NotNull 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> @NotNull 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> @NotNull Map<K,R>
fetchMap(Class<? extends K> keyType)
Execute the query and return aMap
with results grouped by the given key entity.<K,V>
@NotNull 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>
@NotNull 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.@NotNull 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.@NotNull 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> @NotNull 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.@NotNull 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> @NotNull 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> @NotNull 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.@NotNull 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> @NotNull 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.@NotNull 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> @NotNull 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.@NotNull 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> @NotNull 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> @NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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.@NotNull 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.@NotNull 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> @NotNull 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.@NotNull 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> @NotNull 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> @NotNull 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.@NotNull 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> @NotNull 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> @NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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>
@NotNull 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.@NotNull 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.@Nullable Object
fetchOne(int fieldIndex)
Execute the query and return at most one resulting value for a field index from the generated result.<U> U
fetchOne(int fieldIndex, Class<? extends U> 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.@Nullable Object
fetchOne(String fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<U> U
fetchOne(String fieldName, Class<? extends U> 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.<U> U
fetchOne(Field<?> field, Class<? extends U> 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.@Nullable Object
fetchOne(Name fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<U> U
fetchOne(Name fieldName, Class<? extends U> 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.@Nullable 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.@Nullable Map<String,Object>
fetchOneMap()
Execute the query and return at most one resulting record as a name/value map.@NotNull Optional<R>
fetchOptional()
Execute the query and return at most one resulting record.@NotNull Optional<?>
fetchOptional(int fieldIndex)
Execute the query and return at most one resulting value for a field index from the generated result.<U> @NotNull Optional<U>
fetchOptional(int fieldIndex, Class<? extends U> type)
Execute the query and return at most one resulting value for a field index from the generated result.<U> @NotNull 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.@NotNull Optional<?>
fetchOptional(String fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<U> @NotNull Optional<U>
fetchOptional(String fieldName, Class<? extends U> type)
Execute the query and return at most one resulting value for a field name from the generated result.<U> @NotNull 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.<U> @NotNull Optional<U>
fetchOptional(Field<?> field, Class<? extends U> type)
Execute the query and return at most one resulting value for a field from the generated result.<T> @NotNull 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>
@NotNull 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.@NotNull Optional<?>
fetchOptional(Name fieldName)
Execute the query and return at most one resulting value for a field name from the generated result.<U> @NotNull Optional<U>
fetchOptional(Name fieldName, Class<? extends U> type)
Execute the query and return at most one resulting value for a field name from the generated result.<U> @NotNull 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> @NotNull Optional<E>
fetchOptional(RecordMapper<? super R,E> mapper)
Execute the query and return at most one resulting value into a custom mapper callback.@NotNull Optional<Object[]>
fetchOptionalArray()
Execute the query and return at most one resulting record as an array.<E> @NotNull Optional<E>
fetchOptionalInto(Class<? extends E> type)
Map resulting records onto a custom type.<Z extends Record>
@NotNull Optional<Z>fetchOptionalInto(Table<Z> table)
Map resulting records onto a custom record.@NotNull Optional<Map<String,Object>>
fetchOptionalMap()
Execute the query and return at most one resulting record as a name/value map.@NotNull ResultSet
fetchResultSet()
Execute the query and return the generated result as a JDBCResultSet
.@NotNull Set<?>
fetchSet(int fieldIndex)
Execute the query and return all values for a field index from the generated result.<U> @NotNull Set<U>
fetchSet(int fieldIndex, Class<? extends U> type)
Execute the query and return all values for a field index from the generated result.<U> @NotNull Set<U>
fetchSet(int fieldIndex, Converter<?,? extends U> converter)
Execute the query and return all values for a field index from the generated result.@NotNull Set<?>
fetchSet(String fieldName)
Execute the query and return all values for a field name from the generated result.<U> @NotNull Set<U>
fetchSet(String fieldName, Class<? extends U> type)
Execute the query and return all values for a field name from the generated result.<U> @NotNull Set<U>
fetchSet(String fieldName, Converter<?,? extends U> converter)
Execute the query and return all values for a field name from the generated result.<U> @NotNull Set<U>
fetchSet(Field<?> field, Class<? extends U> type)
Execute the query and return all values for a field from the generated result.<T> @NotNull Set<T>
fetchSet(Field<T> field)
Execute the query and return all values for a field from the generated result.<T,U>
@NotNull 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.@NotNull Set<?>
fetchSet(Name fieldName)
Execute the query and return all values for a field name from the generated result.<U> @NotNull Set<U>
fetchSet(Name fieldName, Class<? extends U> type)
Execute the query and return all values for a field name from the generated result.<U> @NotNull 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> @NotNull 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.@Nullable Object
fetchSingle(int fieldIndex)
Execute the query and return exactly one resulting value for a field index from the generated result.<U> U
fetchSingle(int fieldIndex, Class<? extends U> 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.@Nullable Object
fetchSingle(String fieldName)
Execute the query and return exactly one resulting value for a field name from the generated result.<U> U
fetchSingle(String fieldName, Class<? extends U> 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.<U> U
fetchSingle(Field<?> field, Class<? extends U> 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.@Nullable Object
fetchSingle(Name fieldName)
Execute the query and return exactly one resulting value for a field name from the generated result.<U> U
fetchSingle(Name fieldName, Class<? extends U> 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.@NotNull 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.@NotNull Map<String,Object>
fetchSingleMap()
Execute the query and return exactly one resulting record as a name/value map.@NotNull ResultQuery<R>
fetchSize(int rows)
Specify the fetch size of the underlyingStatement
.@NotNull Stream<R>
fetchStream()
Stream this query.<E> @NotNull Stream<E>
fetchStreamInto(Class<? extends E> type)
Stream this query, mapping records into a custom type.<Z extends Record>
@NotNull 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.@NotNull Class<? extends R>
getRecordType()
The record type produced by this query.@Nullable Result<R>
getResult()
Return the result generated by a previous call to execute().@NotNull ResultQuery<R>
intern(int... fieldIndexes)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0@NotNull ResultQuery<R>
intern(String... fieldNames)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0@NotNull ResultQuery<R>
intern(Field<?>... fields)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0@NotNull ResultQuery<R>
intern(Name... fieldNames)
Deprecated.- 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0@NotNull Iterator<R>
iterator()
@NotNull ResultQuery<R>
keepStatement(boolean keepStatement)
Keep the query's underlying statement open after execution.@NotNull ResultQuery<R>
maxRows(int rows)
Specify the maximum number of rows returned by the underlyingStatement
.@NotNull ResultQuery<R>
poolable(boolean poolable)
Specify whether any JDBCStatement
created by this query should beStatement.setPoolable(boolean)
.@NotNull ResultQuery<R>
queryTimeout(int timeout)
Specify the query timeout in number of seconds for the underlying JDBCStatement
.@NotNull ResultQuery<R>
resultSetConcurrency(int resultSetConcurrency)
Specify theResultSet
concurrency ofResultSet
objects created by jOOQ.@NotNull ResultQuery<R>
resultSetHoldability(int resultSetHoldability)
Specify theResultSet
holdability ofResultSet
objects created by jOOQ.@NotNull ResultQuery<R>
resultSetType(int resultSetType)
Specify theResultSet
type ofResultSet
objects created by jOOQ.default @NotNull Spliterator<R>
spliterator()
Execute the query usingfetch()
and return the generated result as anSpliterator
.@NotNull 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
@Nullable @Nullable 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull Iterator<R> iterator() throws DataAccessException
- Specified by:
iterator
in interfaceIterable<R extends Record>
- Throws:
DataAccessException
-
spliterator
@NotNull default @NotNull Spliterator<R> spliterator()
- Specified by:
spliterator
in interfaceIterable<R extends Record>
-
fetchStream
@NotNull @NotNull 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
@NotNull <E> @NotNull 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
@NotNull <Z extends Record> @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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 @NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull <T> @NotNull 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
@NotNull <U> @NotNull List<U> fetch(Field<?> field, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(Field, Class)
-
fetch
@NotNull <T,U> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull List<U> fetch(int fieldIndex, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(int, Class)
-
fetch
@NotNull <U> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull List<U> fetch(String fieldName, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(String, Class)
-
fetch
@NotNull <U> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull List<U> fetch(Name fieldName, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Record.get(Name, Class)
-
fetch
@NotNull <U> @NotNull 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
@Nullable <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
@Nullable <U> U fetchOne(Field<?> field, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@Nullable <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
@Nullable @Nullable 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
@Nullable <U> U fetchOne(int fieldIndex, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@Nullable <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
@Nullable @Nullable 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
@Nullable <U> U fetchOne(String fieldName, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@Nullable <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
@Nullable @Nullable 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
@Nullable <U> U fetchOne(Name fieldName, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@Nullable <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
@Nullable 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
@Nullable <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
@Nullable @Nullable 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
@Nullable @Nullable 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
@Nullable <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
@Nullable <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
@Nullable <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
@Nullable <U> U fetchSingle(Field<?> field, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@Nullable <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
@Nullable @Nullable 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
@Nullable <U> U fetchSingle(int fieldIndex, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@Nullable <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
@Nullable @Nullable 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
@Nullable <U> U fetchSingle(String fieldName, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@Nullable <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
@Nullable @Nullable 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
@Nullable <U> U fetchSingle(Name fieldName, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@Nullable <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
@NotNull 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
@NotNull <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. 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
-
fetchSingleMap
@NotNull @NotNull 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
@NotNull @NotNull 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.
- 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
@NotNull <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. 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:
Record.into(Table)
,Result.into(Table)
-
fetchOptional
@NotNull <T> @NotNull 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
@NotNull <U> @NotNull Optional<U> fetchOptional(Field<?> field, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
@NotNull <T,U> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull Optional<U> fetchOptional(int fieldIndex, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
@NotNull <U> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull Optional<U> fetchOptional(String fieldName, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
@NotNull <U> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull Optional<U> fetchOptional(Name fieldName, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The resulting value
- Throws:
DataAccessException
- if something went wrong executing the queryTooManyRowsException
- if the query returned more than one record
-
fetchOptional
@NotNull <U> @NotNull 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
@NotNull @NotNull 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
@NotNull <E> @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull <E> @NotNull 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
@NotNull <Z extends Record> @NotNull 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
@Nullable <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
@Nullable <U> U fetchAny(Field<?> field, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
@Nullable <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
@Nullable @Nullable 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
@Nullable <U> U fetchAny(int fieldIndex, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
@Nullable <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
@Nullable @Nullable 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
@Nullable <U> U fetchAny(String fieldName, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
@Nullable <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
@Nullable @Nullable 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
@Nullable <U> U fetchAny(Name fieldName, Class<? extends U> 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)
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The resulting value or
null
if the query returned no records. - Throws:
DataAccessException
- if something went wrong executing the query
-
fetchAny
@Nullable <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
@Nullable 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
@Nullable <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
@Nullable @Nullable 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
@Nullable @Nullable 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
@Nullable <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
@Nullable <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
@NotNull @NotNull 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
@NotNull <K> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,V> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,V> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,V> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,V> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,V> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <S extends Record> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <S extends Record,T extends Record> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E,S extends Record> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E,S extends Record> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,V> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,V> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,V> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,V> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,V> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <S extends Record> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <S extends Record,T extends Record> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E,S extends Record> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E,S extends Record> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <K,E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull <E> @NotNull 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.The resulting map is iteration order preserving.
- 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull U[] fetchArray(int fieldIndex, Class<? extends U> 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]
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@NotNull <U> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull U[] fetchArray(String fieldName, Class<? extends U> 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]
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@NotNull <U> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull U[] fetchArray(Name fieldName, Class<? extends U> 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]
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@NotNull <U> @NotNull 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
@NotNull <T> @NotNull 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
@NotNull <U> @NotNull U[] fetchArray(Field<?> field, Class<? extends U> 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]
The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- Returns:
- The result. This will never be
null
. - Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Result.intoArray(Field, Class)
-
fetchArray
@NotNull <T,U> @NotNull 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
@NotNull <E> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull Set<U> fetchSet(int fieldIndex, Class<? extends U> type) throws DataAccessException
Execute the query and return all values for a field index from the generated result.The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@NotNull <U> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull Set<U> fetchSet(String fieldName, Class<? extends U> type) throws DataAccessException
Execute the query and return all values for a field name from the generated result.The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@NotNull <U> @NotNull 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
@NotNull @NotNull 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
@NotNull <U> @NotNull Set<U> fetchSet(Name fieldName, Class<? extends U> type) throws DataAccessException
Execute the query and return all values for a field name from the generated result.The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@NotNull <U> @NotNull 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
@NotNull <T> @NotNull 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
@NotNull <U> @NotNull Set<U> fetchSet(Field<?> field, Class<? extends U> type) throws DataAccessException
Execute the query and return all values for a field from the generated result.The
Converter
that is provided byConfiguration.converterProvider()
will be used to convert the value toU
- 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
@NotNull <T,U> @NotNull 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
@NotNull <E> @NotNull 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
@NotNull <Z extends Record> @NotNull 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
@NotNull <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
@NotNull <E> @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @Deprecated @NotNull 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
@NotNull @Deprecated @NotNull 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
-
getRecordType
@NotNull @NotNull Class<? extends R> getRecordType()
The record type produced by this query.
-
bind
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @NotNull 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
@NotNull @Deprecated @NotNull 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
@NotNull @Deprecated @NotNull 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
@NotNull @Deprecated @NotNull 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
@NotNull @Deprecated @NotNull 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
@NotNull <X extends Record> @NotNull ResultQuery<X> coerce(Table<X> table)
Coerce the result record type of this query to that of a table.
-
coerce
@NotNull @NotNull ResultQuery<Record> coerce(Field<?>... fields)
Coerce the result record type of this query to that of a set of fields.
-
coerce
@NotNull @NotNull ResultQuery<Record> coerce(Collection<? extends Field<?>> fields)
Coerce the result record type of this query to that of a set of fields.
-
coerce
@NotNull <T1> @NotNull ResultQuery<Record1<T1>> coerce(Field<T1> field1)
Coerce the result record type of this query to that of a set of fields.
-
coerce
@NotNull <T1,T2> @NotNull 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
@NotNull <T1,T2,T3> @NotNull 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
@NotNull <T1,T2,T3,T4> @NotNull 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
@NotNull <T1,T2,T3,T4,T5> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21> @NotNull 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
@NotNull <T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22> @NotNull 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.
-
-