Package org.jooq

Interface ResultQuery<R extends Record>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods 
      Modifier and Type Method Description
      ResultQuery<R> bind​(int index, java.lang.Object value)
      Bind a new value to an indexed parameter.
      ResultQuery<R> bind​(java.lang.String param, java.lang.Object value)
      Bind a new value to a named parameter.
      ResultQuery<Record> coerce​(java.util.Collection<? extends Field<?>> fields)
      Coerce the result record type of this query to that of a set of fields.
      ResultQuery<Record> coerce​(Field<?>... fields)
      Coerce the result record type of this query to that of a set of fields.
      <T1> ResultQuery<Record1<T1>> coerce​(Field<T1> field1)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2>
      ResultQuery<Record2<T1,​T2>>
      coerce​(Field<T1> field1, Field<T2> field2)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3>
      ResultQuery<Record3<T1,​T2,​T3>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4>
      ResultQuery<Record4<T1,​T2,​T3,​T4>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5>
      ResultQuery<Record5<T1,​T2,​T3,​T4,​T5>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6>
      ResultQuery<Record6<T1,​T2,​T3,​T4,​T5,​T6>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7>
      ResultQuery<Record7<T1,​T2,​T3,​T4,​T5,​T6,​T7>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>
      ResultQuery<Record8<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>
      ResultQuery<Record9<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>
      ResultQuery<Record10<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11>
      ResultQuery<Record11<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12>
      ResultQuery<Record12<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13>
      ResultQuery<Record13<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14>
      ResultQuery<Record14<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15>
      ResultQuery<Record15<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16>
      ResultQuery<Record16<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17>
      ResultQuery<Record17<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18>
      ResultQuery<Record18<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19>
      ResultQuery<Record19<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20>
      ResultQuery<Record20<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21>
      ResultQuery<Record21<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20, Field<T21> field21)
      Coerce the result record type of this query to that of a set of fields.
      <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21,​T22>
      ResultQuery<Record22<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21,​T22>>
      coerce​(Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13, Field<T14> field14, Field<T15> field15, Field<T16> field16, Field<T17> field17, Field<T18> field18, Field<T19> field19, Field<T20> field20, Field<T21> field21, Field<T22> field22)
      Coerce the result record type of this query to that of a set of fields.
      <X extends Record>
      ResultQuery<X>
      coerce​(Table<X> table)
      Coerce the result record type of this query to that of a table.
      <X,​A>
      X
      collect​(java.util.stream.Collector<? super R,​A,​X> collector)
      Reduce the execution results of this query using a Collector.
      Result<R> fetch()
      Execute the query and return the generated result.
      java.util.List<?> fetch​(int fieldIndex)
      Execute the query and return all values for a field index from the generated result.
      <T> java.util.List<T> fetch​(int fieldIndex, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field index from the generated result.
      <U> java.util.List<U> fetch​(int fieldIndex, Converter<?,​? extends U> converter)
      Execute the query and return all values for a field index from the generated result.
      java.util.List<?> fetch​(java.lang.String fieldName)
      Execute the query and return all values for a field name from the generated result.
      <T> java.util.List<T> fetch​(java.lang.String fieldName, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field name from the generated result.
      <U> java.util.List<U> fetch​(java.lang.String fieldName, Converter<?,​? extends U> converter)
      Execute the query and return all values for a field name from the generated result.
      <T> java.util.List<T> fetch​(Field<?> field, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field from the generated result.
      <T> java.util.List<T> fetch​(Field<T> field)
      Execute the query and return all values for a field from the generated result.
      <T,​U>
      java.util.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.
      java.util.List<?> fetch​(Name fieldName)
      Execute the query and return all values for a field name from the generated result.
      <T> java.util.List<T> fetch​(Name fieldName, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field name from the generated result.
      <U> java.util.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> java.util.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.
      java.lang.Object fetchAny​(int fieldIndex)
      Execute the query and return at most one resulting value for a field index from the generated result.
      <T> T fetchAny​(int fieldIndex, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field index from the generated result.
      <U> U fetchAny​(int fieldIndex, Converter<?,​? extends U> converter)
      Execute the query and return at most one resulting value for a field index from the generated result.
      java.lang.Object fetchAny​(java.lang.String fieldName)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <T> T fetchAny​(java.lang.String fieldName, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <U> U fetchAny​(java.lang.String fieldName, Converter<?,​? extends U> converter)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <T> T fetchAny​(Field<?> field, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field from the generated result.
      <T> T fetchAny​(Field<T> field)
      Execute the query and return at most one resulting value for a field from the generated result.
      <T,​U>
      U
      fetchAny​(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.
      java.lang.Object fetchAny​(Name fieldName)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <T> T fetchAny​(Name fieldName, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <U> U fetchAny​(Name fieldName, Converter<?,​? extends U> converter)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <E> E fetchAny​(RecordMapper<? super R,​E> mapper)
      Execute the query and return at most one resulting record.
      java.lang.Object[] fetchAnyArray()
      Execute the query and return at most one resulting record as an array
      <E> E fetchAnyInto​(java.lang.Class<? extends E> type)
      Map resulting records onto a custom type.
      <Z extends Record>
      Z
      fetchAnyInto​(Table<Z> table)
      Map resulting records onto a custom record.
      java.util.Map<java.lang.String,​java.lang.Object> fetchAnyMap()
      Execute the query and return at most one resulting record as a name/value map.
      R[] fetchArray()
      Execute the query and return the generated result as an array of records.
      java.lang.Object[] fetchArray​(int fieldIndex)
      Execute the query and return all values for a field index from the generated result.
      <T> T[] fetchArray​(int fieldIndex, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field index from the generated result.
      <U> U[] fetchArray​(int fieldIndex, Converter<?,​? extends U> converter)
      Execute the query and return all values for a field index from the generated result.
      java.lang.Object[] fetchArray​(java.lang.String fieldName)
      Execute the query and return all values for a field name from the generated result.
      <T> T[] fetchArray​(java.lang.String fieldName, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field name from the generated result.
      <U> U[] fetchArray​(java.lang.String fieldName, Converter<?,​? extends U> converter)
      Execute the query and return all values for a field name from the generated result.
      <T> T[] fetchArray​(Field<?> field, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field from the generated result.
      <T> T[] fetchArray​(Field<T> field)
      Execute the query and return all values for a field from the generated result.
      <T,​U>
      U[]
      fetchArray​(Field<T> field, Converter<? super T,​? extends U> converter)
      Execute the query and return all values for a field from the generated result.
      java.lang.Object[] fetchArray​(Name fieldName)
      Execute the query and return all values for a field name from the generated result.
      <T> T[] fetchArray​(Name fieldName, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field name from the generated result.
      <U> U[] fetchArray​(Name fieldName, Converter<?,​? extends U> converter)
      Execute the query and return all values for a field name from the generated result.
      java.lang.Object[][] fetchArrays()
      Execute the query and return the generated result as an Object matrix.
      java.util.concurrent.CompletionStage<Result<R>> fetchAsync()
      Fetch results in a new CompletionStage.
      java.util.concurrent.CompletionStage<Result<R>> fetchAsync​(java.util.concurrent.Executor executor)
      Fetch results in a new CompletionStage that is asynchronously completed by a task running in the given executor.
      java.util.Map<?,​Result<R>> fetchGroups​(int keyFieldIndex)
      Execute the query and return a Map with one of the result's columns as key and a list of corresponding records as value.
      java.util.Map<Record,​Result<R>> fetchGroups​(int[] keyFieldIndexes)
      Execute the query and return a Map with the result grouped by the given keys.
      java.util.Map<Record,​Result<Record>> fetchGroups​(int[] keyFieldIndexes, int[] valueFieldIndexes)
      Execute the query and return a Map with the result grouped by the given keys.
      <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(int[] keyFieldIndexes, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.
      <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(int[] keyFieldIndexes, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.
      java.util.Map<?,​java.util.List<?>> fetchGroups​(int keyFieldIndex, int valueFieldIndex)
      Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value
      <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(int keyFieldIndex, java.lang.Class<? extends E> type)
      Return a Map with results grouped by the given key and mapped into the given entity type.
      <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(int keyFieldIndex, RecordMapper<? super R,​E> mapper)
      Return a Map with results grouped by the given key and mapped by the given mapper.
      <K> java.util.Map<K,​Result<R>> fetchGroups​(java.lang.Class<? extends K> keyType)
      Execute the query and return a Map with results grouped by the given key entity.
      <K,​V>
      java.util.Map<K,​java.util.List<V>>
      fetchGroups​(java.lang.Class<? extends K> keyType, java.lang.Class<? extends V> valueType)
      Execute the query and return a Map with results grouped by the given key entity and mapped into the given entity type.
      <K,​V>
      java.util.Map<K,​java.util.List<V>>
      fetchGroups​(java.lang.Class<? extends K> keyType, RecordMapper<? super R,​V> valueMapper)
      Execute the query and return a Map with results grouped by the given key entity and mapped into the given entity type.
      java.util.Map<?,​Result<R>> fetchGroups​(java.lang.String keyFieldName)
      Execute the query and return a Map with one of the result's columns as key and a list of corresponding records as value.
      java.util.Map<Record,​Result<R>> fetchGroups​(java.lang.String[] keyFieldNames)
      Execute the query and return a Map with the result grouped by the given keys.
      <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(java.lang.String[] keyFieldNames, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.
      java.util.Map<Record,​Result<Record>> fetchGroups​(java.lang.String[] keyFieldNames, java.lang.String[] valueFieldNames)
      Execute the query and return a Map with the result grouped by the given keys.
      <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(java.lang.String[] keyFieldNames, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.
      <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(java.lang.String keyFieldName, java.lang.Class<? extends E> type)
      Return a Map with results grouped by the given key and mapped into the given entity type.
      java.util.Map<?,​java.util.List<?>> fetchGroups​(java.lang.String keyFieldName, java.lang.String valueFieldName)
      Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value
      <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(java.lang.String keyFieldName, RecordMapper<? super R,​E> mapper)
      Return a Map with results grouped by the given key and mapped by the given mapper.
      java.util.Map<Record,​Result<R>> fetchGroups​(Field<?>[] keys)
      Execute the query and return a Map with the result grouped by the given keys.
      <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(Field<?>[] keys, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.
      java.util.Map<Record,​Result<Record>> fetchGroups​(Field<?>[] keys, Field<?>[] values)
      Execute the query and return a Map with the result grouped by the given keys.
      <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(Field<?>[] keys, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.
      <K> java.util.Map<K,​Result<R>> fetchGroups​(Field<K> key)
      Execute the query and return a Map with one of the result's columns as key and a list of corresponding records as value.
      <K,​E>
      java.util.Map<K,​java.util.List<E>>
      fetchGroups​(Field<K> key, java.lang.Class<? extends E> type)
      Return a Map with results grouped by the given key and mapped into the given entity type.
      <K,​V>
      java.util.Map<K,​java.util.List<V>>
      fetchGroups​(Field<K> key, Field<V> value)
      Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value
      <K,​E>
      java.util.Map<K,​java.util.List<E>>
      fetchGroups​(Field<K> key, RecordMapper<? super R,​E> mapper)
      Return a Map with results grouped by the given key and mapped by the given mapper.
      java.util.Map<?,​Result<R>> fetchGroups​(Name keyFieldName)
      Execute the query and return a Map with one of the result's columns as key and a list of corresponding records as value.
      java.util.Map<Record,​Result<R>> fetchGroups​(Name[] keyFieldNames)
      Execute the query and return a Map with the result grouped by the given keys.
      <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(Name[] keyFieldNames, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.
      java.util.Map<Record,​Result<Record>> fetchGroups​(Name[] keyFieldNames, Name[] valueFieldNames)
      Execute the query and return a Map with the result grouped by the given keys.
      <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(Name[] keyFieldNames, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.
      <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(Name keyFieldName, java.lang.Class<? extends E> type)
      Return a Map with results grouped by the given key and mapped into the given entity type.
      java.util.Map<?,​java.util.List<?>> fetchGroups​(Name keyFieldName, Name valueFieldName)
      Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value
      <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(Name keyFieldName, RecordMapper<? super R,​E> mapper)
      Return a Map with results grouped by the given key and mapped by the given mapper.
      <K> java.util.Map<K,​Result<R>> fetchGroups​(RecordMapper<? super R,​K> keyMapper)
      Execute the query and return a Map with results grouped by the given key entity and mapped into the given entity type.
      <K,​V>
      java.util.Map<K,​java.util.List<V>>
      fetchGroups​(RecordMapper<? super R,​K> keyMapper, java.lang.Class<V> valueType)
      Execute the query and return a Map with results grouped by the given key entity and mapped into the given entity type.
      <K,​V>
      java.util.Map<K,​java.util.List<V>>
      fetchGroups​(RecordMapper<? super R,​K> keyMapper, RecordMapper<? super R,​V> valueMapper)
      Execute the query and return a Map with results grouped by the given key entity and mapped into the given entity type.
      <S extends Record>
      java.util.Map<S,​Result<R>>
      fetchGroups​(Table<S> table)
      Execute the query and return a Map with the result grouped by the given table.
      <E,​S extends Record>
      java.util.Map<S,​java.util.List<E>>
      fetchGroups​(Table<S> table, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given table and mapped into the given entity type.
      <E,​S extends Record>
      java.util.Map<S,​java.util.List<E>>
      fetchGroups​(Table<S> table, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given table and mapped by the given mapper.
      <S extends Record,​T extends Record>
      java.util.Map<S,​Result<T>>
      fetchGroups​(Table<S> keyTable, Table<T> valueTable)
      Execute the query and return a Map with the result grouped by the given table.
      <H extends RecordHandler<? super R>>
      H
      fetchInto​(H handler)
      Fetch results into a custom handler callback.
      <E> java.util.List<E> fetchInto​(java.lang.Class<? extends E> type)
      Map resulting records onto a custom type.
      <Z extends Record>
      Result<Z>
      fetchInto​(Table<Z> table)
      Map resulting records onto a custom record.
      FutureResult<R> fetchLater()
      Deprecated.
      - 3.2.0 - [#2581] - This method will be removed in jOOQ 4.0
      FutureResult<R> fetchLater​(java.util.concurrent.ExecutorService executor)
      Deprecated.
      - 3.2.0 - [#2581] - This method will be removed in jOOQ 4.0
      Cursor<R> fetchLazy()
      Execute the query and "lazily" return the generated result.
      Cursor<R> fetchLazy​(int fetchSize)
      Deprecated.
      - [#2811] - 3.3.0 - Use fetchSize(int) and fetchLazy() instead.
      Results fetchMany()
      Execute a query, possibly returning several result sets.
      java.util.Map<?,​R> fetchMap​(int keyFieldIndex)
      Execute the query and return a Map with one of the result's columns as key and the corresponding records as value.
      java.util.Map<Record,​R> fetchMap​(int[] keyFieldIndexes)
      Execute the query and return a Map with keys as a map key and the corresponding record as value.
      java.util.Map<Record,​Record> fetchMap​(int[] keyFieldIndexes, int[] valueFieldIndexes)
      Execute the query and return a Map with keys as a map key and the corresponding record as value.
      <E> java.util.Map<java.util.List<?>,​E> fetchMap​(int[] keyFieldIndexes, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.
      <E> java.util.Map<java.util.List<?>,​E> fetchMap​(int[] keyFieldIndexes, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.
      java.util.Map<?,​?> fetchMap​(int keyFieldIndex, int valueFieldIndex)
      Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value
      <E> java.util.Map<?,​E> fetchMap​(int keyFieldIndex, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given key and mapped into the given entity type.
      <E> java.util.Map<?,​E> fetchMap​(int keyFieldIndex, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given key and mapped by the given mapper.
      <K> java.util.Map<K,​R> fetchMap​(java.lang.Class<? extends K> keyType)
      Execute the query and return a Map with results grouped by the given key entity.
      <K,​V>
      java.util.Map<K,​V>
      fetchMap​(java.lang.Class<? extends K> keyType, java.lang.Class<? extends V> valueType)
      Execute the query and return a Map with results grouped by the given key entity and mapped into the given entity type.
      <K,​V>
      java.util.Map<K,​V>
      fetchMap​(java.lang.Class<? extends K> keyType, RecordMapper<? super R,​V> valueMapper)
      Execute the query and return a Map with results grouped by the given key entity and mapped into the given entity type.
      java.util.Map<?,​R> fetchMap​(java.lang.String keyFieldName)
      Execute the query and return a Map with one of the result's columns as key and the corresponding records as value.
      java.util.Map<Record,​R> fetchMap​(java.lang.String[] keyFieldNames)
      Execute the query and return a Map with keys as a map key and the corresponding record as value.
      <E> java.util.Map<java.util.List<?>,​E> fetchMap​(java.lang.String[] keyFieldNames, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.
      java.util.Map<Record,​Record> fetchMap​(java.lang.String[] keyFieldNames, java.lang.String[] valueFieldNames)
      Execute the query and return a Map with keys as a map key and the corresponding record as value.
      <E> java.util.Map<java.util.List<?>,​E> fetchMap​(java.lang.String[] keyFieldNames, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.
      <E> java.util.Map<?,​E> fetchMap​(java.lang.String keyFieldName, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given key and mapped into the given entity type.
      java.util.Map<?,​?> fetchMap​(java.lang.String keyFieldName, java.lang.String valueFieldName)
      Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value
      <E> java.util.Map<?,​E> fetchMap​(java.lang.String keyFieldName, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given key and mapped by the given mapper.
      java.util.Map<Record,​R> fetchMap​(Field<?>[] keys)
      Execute the query and return a Map with keys as a map key and the corresponding record as value.
      <E> java.util.Map<java.util.List<?>,​E> fetchMap​(Field<?>[] keys, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.
      java.util.Map<Record,​Record> fetchMap​(Field<?>[] keys, Field<?>[] values)
      Execute the query and return a Map with keys as a map key and the corresponding record as value.
      <E> java.util.Map<java.util.List<?>,​E> fetchMap​(Field<?>[] keys, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.
      <K> java.util.Map<K,​R> fetchMap​(Field<K> key)
      Execute the query and return a Map with one of the result's columns as key and the corresponding records as value.
      <K,​E>
      java.util.Map<K,​E>
      fetchMap​(Field<K> key, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given key and mapped into the given entity type.
      <K,​V>
      java.util.Map<K,​V>
      fetchMap​(Field<K> key, Field<V> value)
      Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value
      <K,​E>
      java.util.Map<K,​E>
      fetchMap​(Field<K> key, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given key and mapped by the given mapper.
      java.util.Map<?,​R> fetchMap​(Name keyFieldName)
      Execute the query and return a Map with one of the result's columns as key and the corresponding records as value.
      java.util.Map<Record,​R> fetchMap​(Name[] keyFieldNames)
      Execute the query and return a Map with keys as a map key and the corresponding record as value.
      <E> java.util.Map<java.util.List<?>,​E> fetchMap​(Name[] keyFieldNames, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.
      java.util.Map<Record,​Record> fetchMap​(Name[] keyFieldNames, Name[] valueFieldNames)
      Execute the query and return a Map with keys as a map key and the corresponding record as value.
      <E> java.util.Map<java.util.List<?>,​E> fetchMap​(Name[] keyFieldNames, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.
      <E> java.util.Map<?,​E> fetchMap​(Name keyFieldName, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given key and mapped into the given entity type.
      java.util.Map<?,​?> fetchMap​(Name keyFieldName, Name valueFieldName)
      Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value
      <E> java.util.Map<?,​E> fetchMap​(Name keyFieldName, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given key and mapped by the given mapper.
      <K> java.util.Map<K,​R> fetchMap​(RecordMapper<? super R,​K> keyMapper)
      Execute the query and return a Map with results grouped by the given key entity and mapped into the given entity type.
      <K,​V>
      java.util.Map<K,​V>
      fetchMap​(RecordMapper<? super R,​K> keyMapper, java.lang.Class<V> valueType)
      Execute the query and return a Map with results grouped by the given key entity and mapped into the given entity type.
      <K,​V>
      java.util.Map<K,​V>
      fetchMap​(RecordMapper<? super R,​K> keyMapper, RecordMapper<? super R,​V> valueMapper)
      Execute the query and return a Map with results grouped by the given key entity and mapped into the given entity type.
      <S extends Record>
      java.util.Map<S,​R>
      fetchMap​(Table<S> table)
      Execute the query and return a Map with table as a map key and the corresponding record as value.
      <E,​S extends Record>
      java.util.Map<S,​E>
      fetchMap​(Table<S> table, java.lang.Class<? extends E> type)
      Execute the query and return a Map with results grouped by the given table and mapped into the given entity type.
      <E,​S extends Record>
      java.util.Map<S,​E>
      fetchMap​(Table<S> table, RecordMapper<? super R,​E> mapper)
      Execute the query and return a Map with results grouped by the given table and mapped by the given mapper.
      <S extends Record,​T extends Record>
      java.util.Map<S,​T>
      fetchMap​(Table<S> keyTable, Table<T> valueTable)
      Execute the query and return a Map with table as a map key and the corresponding record as value.
      java.util.List<java.util.Map<java.lang.String,​java.lang.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.
      java.lang.Object fetchOne​(int fieldIndex)
      Execute the query and return at most one resulting value for a field index from the generated result.
      <T> T fetchOne​(int fieldIndex, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field index from the generated result.
      <U> U fetchOne​(int fieldIndex, Converter<?,​? extends U> converter)
      Execute the query and return at most one resulting value for a field index from the generated result.
      java.lang.Object fetchOne​(java.lang.String fieldName)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <T> T fetchOne​(java.lang.String fieldName, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <U> U fetchOne​(java.lang.String fieldName, Converter<?,​? extends U> converter)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <T> T fetchOne​(Field<?> field, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field from the generated result.
      <T> T fetchOne​(Field<T> field)
      Execute the query and return at most one resulting value for a field from the generated result.
      <T,​U>
      U
      fetchOne​(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.
      java.lang.Object fetchOne​(Name fieldName)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <T> T fetchOne​(Name fieldName, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <U> U fetchOne​(Name fieldName, Converter<?,​? extends U> converter)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <E> E fetchOne​(RecordMapper<? super R,​E> mapper)
      Execute the query and return at most one resulting value into a custom mapper callback.
      java.lang.Object[] fetchOneArray()
      Execute the query and return at most one resulting record as an array
      <E> E fetchOneInto​(java.lang.Class<? extends E> type)
      Map resulting records onto a custom type.
      <Z extends Record>
      Z
      fetchOneInto​(Table<Z> table)
      Map resulting records onto a custom record.
      java.util.Map<java.lang.String,​java.lang.Object> fetchOneMap()
      Execute the query and return at most one resulting record as a name/value map.
      java.util.Optional<R> fetchOptional()
      Execute the query and return at most one resulting record.
      java.util.Optional<?> fetchOptional​(int fieldIndex)
      Execute the query and return at most one resulting value for a field index from the generated result.
      <T> java.util.Optional<T> fetchOptional​(int fieldIndex, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field index from the generated result.
      <U> java.util.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.
      java.util.Optional<?> fetchOptional​(java.lang.String fieldName)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <T> java.util.Optional<T> fetchOptional​(java.lang.String fieldName, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <U> java.util.Optional<U> fetchOptional​(java.lang.String fieldName, Converter<?,​? extends U> converter)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <T> java.util.Optional<T> fetchOptional​(Field<?> field, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field from the generated result.
      <T> java.util.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>
      java.util.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.
      java.util.Optional<?> fetchOptional​(Name fieldName)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <T> java.util.Optional<T> fetchOptional​(Name fieldName, java.lang.Class<? extends T> type)
      Execute the query and return at most one resulting value for a field name from the generated result.
      <U> java.util.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> java.util.Optional<E> fetchOptional​(RecordMapper<? super R,​E> mapper)
      Execute the query and return at most one resulting value into a custom mapper callback.
      java.util.Optional<java.lang.Object[]> fetchOptionalArray()
      Execute the query and return at most one resulting record as an array.
      <E> java.util.Optional<E> fetchOptionalInto​(java.lang.Class<? extends E> type)
      Map resulting records onto a custom type.
      <Z extends Record>
      java.util.Optional<Z>
      fetchOptionalInto​(Table<Z> table)
      Map resulting records onto a custom record.
      java.util.Optional<java.util.Map<java.lang.String,​java.lang.Object>> fetchOptionalMap()
      Execute the query and return at most one resulting record as a name/value map.
      java.sql.ResultSet fetchResultSet()
      Execute the query and return the generated result as a JDBC ResultSet.
      java.util.Set<?> fetchSet​(int fieldIndex)
      Execute the query and return all values for a field index from the generated result.
      <T> java.util.Set<T> fetchSet​(int fieldIndex, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field index from the generated result.
      <U> java.util.Set<U> fetchSet​(int fieldIndex, Converter<?,​? extends U> converter)
      Execute the query and return all values for a field index from the generated result.
      java.util.Set<?> fetchSet​(java.lang.String fieldName)
      Execute the query and return all values for a field name from the generated result.
      <T> java.util.Set<T> fetchSet​(java.lang.String fieldName, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field name from the generated result.
      <U> java.util.Set<U> fetchSet​(java.lang.String fieldName, Converter<?,​? extends U> converter)
      Execute the query and return all values for a field name from the generated result.
      <T> java.util.Set<T> fetchSet​(Field<?> field, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field from the generated result.
      <T> java.util.Set<T> fetchSet​(Field<T> field)
      Execute the query and return all values for a field from the generated result.
      <T,​U>
      java.util.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.
      java.util.Set<?> fetchSet​(Name fieldName)
      Execute the query and return all values for a field name from the generated result.
      <T> java.util.Set<T> fetchSet​(Name fieldName, java.lang.Class<? extends T> type)
      Execute the query and return all values for a field name from the generated result.
      <U> java.util.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> java.util.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.
      java.lang.Object fetchSingle​(int fieldIndex)
      Execute the query and return exactly one resulting value for a field index from the generated result.
      <T> T fetchSingle​(int fieldIndex, java.lang.Class<? extends T> type)
      Execute the query and return exactly one resulting value for a field index from the generated result.
      <U> U fetchSingle​(int fieldIndex, Converter<?,​? extends U> converter)
      Execute the query and return exactly one resulting value for a field index from the generated result.
      java.lang.Object fetchSingle​(java.lang.String fieldName)
      Execute the query and return exactly one resulting value for a field name from the generated result.
      <T> T fetchSingle​(java.lang.String fieldName, java.lang.Class<? extends T> type)
      Execute the query and return exactly one resulting value for a field name from the generated result.
      <U> U fetchSingle​(java.lang.String fieldName, Converter<?,​? extends U> converter)
      Execute the query and return exactly one resulting value for a field name from the generated result.
      <T> T fetchSingle​(Field<?> field, java.lang.Class<? extends T> type)
      Execute the query and return exactly one resulting value for a field from the generated result.
      <T> T fetchSingle​(Field<T> field)
      Execute the query and return exactly one resulting value for a field from the generated result.
      <T,​U>
      U
      fetchSingle​(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.
      java.lang.Object fetchSingle​(Name fieldName)
      Execute the query and return exactly one resulting value for a field name from the generated result.
      <T> T fetchSingle​(Name fieldName, java.lang.Class<? extends T> type)
      Execute the query and return exactly one resulting value for a field name from the generated result.
      <U> U fetchSingle​(Name fieldName, Converter<?,​? extends U> converter)
      Execute the query and return exactly one resulting value for a field name from the generated result.
      <E> E fetchSingle​(RecordMapper<? super R,​E> mapper)
      Execute the query and return exactly one resulting value into a custom mapper callback.
      java.lang.Object[] fetchSingleArray()
      Execute the query and return exactly one resulting record as an array
      <E> E fetchSingleInto​(java.lang.Class<? extends E> type)
      Map resulting records onto a custom type.
      <Z extends Record>
      Z
      fetchSingleInto​(Table<Z> table)
      Map resulting records onto a custom record.
      java.util.Map<java.lang.String,​java.lang.Object> fetchSingleMap()
      Execute the query and return exactly one resulting record as a name/value map.
      ResultQuery<R> fetchSize​(int rows)
      Specify the fetch size of the underlying Statement.
      java.util.stream.Stream<R> fetchStream()
      Stream this query.
      <E> java.util.stream.Stream<E> fetchStreamInto​(java.lang.Class<? extends E> type)
      Stream this query, mapping records into a custom type.
      <Z extends Record>
      java.util.stream.Stream<Z>
      fetchStreamInto​(Table<Z> table)
      Stream this query, mapping records into a custom record.
      default void forEach​(java.util.function.Consumer<? super R> action)
      Execute the query using fetch() and pass all results to a consumer.
      java.lang.Class<? extends R> getRecordType()
      The record type produced by this query.
      Result<R> getResult()
      Return the result generated by a previous call to execute().
      ResultQuery<R> intern​(int... fieldIndexes)
      Deprecated.
      - 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0
      ResultQuery<R> intern​(java.lang.String... fieldNames)
      Deprecated.
      - 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0
      ResultQuery<R> intern​(Field<?>... fields)
      Deprecated.
      - 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0
      ResultQuery<R> intern​(Name... fieldNames)
      Deprecated.
      - 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0
      java.util.Iterator<R> iterator()
      Execute the query using fetch() and return the generated result as an Iterator.
      ResultQuery<R> keepStatement​(boolean keepStatement)
      Keep the query's underlying statement open after execution.
      ResultQuery<R> maxRows​(int rows)
      Specify the maximum number of rows returned by the underlying Statement.
      ResultQuery<R> poolable​(boolean poolable)
      Specify whether any JDBC Statement created by this query should be Statement.setPoolable(boolean).
      ResultQuery<R> queryTimeout​(int timeout)
      Specify the query timeout in number of seconds for the underlying JDBC Statement.
      ResultQuery<R> resultSetConcurrency​(int resultSetConcurrency)
      Specify the ResultSet concurrency of ResultSet objects created by jOOQ.
      ResultQuery<R> resultSetHoldability​(int resultSetHoldability)
      Specify the ResultSet holdability of ResultSet objects created by jOOQ.
      ResultQuery<R> resultSetType​(int resultSetType)
      Specify the ResultSet type of ResultSet objects created by jOOQ.
      default java.util.Spliterator<R> spliterator()
      Execute the query using fetch() and return the generated result as an Spliterator.
      java.util.stream.Stream<R> stream()
      Stream this query.
      • Methods inherited from interface java.util.concurrent.Flow.Publisher

        subscribe
      • Methods inherited from interface org.reactivestreams.Publisher

        subscribe
    • Method Detail

      • getResult

        Result<R> getResult()
        Return the result generated by a previous call to execute().
        Returns:
        The result or null if no call to execute() was done previously.
      • fetchResultSet

        java.sql.ResultSet fetchResultSet()
                                   throws DataAccessException
        Execute the query and return the generated result as a JDBC ResultSet.

        This is the same as calling fetchLazy(). resultSet() and will return a ResultSet wrapping the JDBC driver's ResultSet. Closing this ResultSet may close the producing Statement or PreparedStatement, depending on your setting for keepStatement(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 with DSLContext.fetch(ResultSet).

        Returns:
        The result. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
      • forEach

        default void forEach​(java.util.function.Consumer<? super R> action)
        Execute the query using fetch() and pass all results to a consumer.

        This is essentially the same as fetch().

        Specified by:
        forEach in interface java.lang.Iterable<R extends Record>
      • spliterator

        default java.util.Spliterator<R> spliterator()
        Execute the query using fetch() and return the generated result as an Spliterator.

        Specified by:
        spliterator in interface java.lang.Iterable<R extends Record>
      • fetchStream

        java.util.stream.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 via ExecuteListener, or via "smart" third-party DataSources.

        Depending on your JDBC driver's default behaviour, this may load the whole database result into the driver's memory. In order to indicate to the driver that you may not want to fetch all records at once, use fetchSize(int) prior to calling this method.

        Returns:
        The result.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        stream()
      • fetchStreamInto

        <E> java.util.stream.Stream<E> fetchStreamInto​(java.lang.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)). See Record.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 via ExecuteListener, or via "smart" third-party DataSources.

        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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Record.into(Class), Result.into(Class), DefaultRecordMapper
      • fetchStreamInto

        <Z extends Record> java.util.stream.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)). See Record.into(Table) for more details.

        The result and its contained records are attached to the original Configuration by default. Use Settings.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 via ExecuteListener, or via "smart" third-party DataSources.

        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

        java.util.stream.Stream<R> stream()
                                   throws DataAccessException
        Stream this query.

        This is essentially the same as fetchLazy() but instead of returning a Cursor, a Java 8 Stream is returned. 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 via ExecuteListener, or via "smart" third-party DataSources.

        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​(java.util.stream.Collector<? super R,​A,​X> collector)
                       throws DataAccessException
        Reduce the execution results of this query using a Collector.

        This works in the same way as calling the following code:

         
         try (Stream<R> stream = resultQuery.stream()) {
             X result = stream.collect(collector);
         }
         
         
        ... with the exception of allowing client code to ignore the need for managing resources, which are handled inside of the collect() method.
        Parameters:
        collector - The collector that collects all records and accumulates them into a result type.
        Returns:
        The result of the collection.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchLazy

        Cursor<R> fetchLazy()
                     throws DataAccessException
        Execute the query and "lazily" return the generated result.

        The returned Cursor holds a reference to the executed PreparedStatement and the associated ResultSet. Data can be fetched (or iterated over) lazily, fetching records from the ResultSet one by one.

        Depending on your JDBC driver's default behaviour, this may load the whole database result into the driver's memory. In order to indicate to the driver that you may not want to fetch all records at once, use fetchSize(int) prior to calling this method.

        Client code is responsible for closing the cursor after use.

        Returns:
        The resulting cursor. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        fetchSize(int)
      • fetchLazy

        @Deprecated
        Cursor<R> fetchLazy​(int fetchSize)
                     throws DataAccessException
        Deprecated.
        - [#2811] - 3.3.0 - Use fetchSize(int) and fetchLazy() instead.
        Execute the query and "lazily" return the generated result.

        The returned Cursor holds a reference to the executed PreparedStatement and the associated ResultSet. Data can be fetched (or iterated over) lazily, fetching records from the ResultSet 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 also Statement.setFetchSize(int)

        Client code is responsible for closing the cursor after use.

        Returns:
        The resulting cursor.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        fetchLazy(), Statement.setFetchSize(int)
      • fetchMany

        Results fetchMany()
                   throws DataAccessException
        Execute a query, possibly returning several result sets.

        Example (Sybase ASE):

         String sql = "sp_help 'my_table'";

        The result and its contained records are attached to the original Configuration by default. Use Settings.isAttachRecords() to override this behaviour.

        Returns:
        The resulting records. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetch

        java.util.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 then Result.getValues(int)

        Returns:
        The result. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetch

        java.util.List<?> fetch​(java.lang.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 then Result.getValues(String)

        Returns:
        The result. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchOneArray

        java.lang.Object[] fetchOneArray()
                                  throws DataAccessException,
                                         TooManyRowsException
        Execute the query and return at most one resulting record as an array

        You 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 query
        TooManyRowsException - if the query returned more than one record
      • fetchAny

        <T> T fetchAny​(Field<T> field)
                throws DataAccessException
        Execute the query and return at most one resulting value for a field from the generated result.

        This is the same as calling fetchOne() and then Record.get(Field)

        Returns:
        The resulting value or null if the query returned no records.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchAny

        <T> T fetchAny​(Field<?> field,
                       java.lang.Class<? extends T> type)
                throws DataAccessException
        Execute the query and return at most one resulting value for a field from the generated result.

        This is the same as calling fetchOne() and then Record.get(Field, Class)

        Returns:
        The resulting value or null if the query returned no records.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchAny

        java.lang.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 then Record.get(int)

        Returns:
        The resulting value or null if the query returned no records.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchAny

        <T> T fetchAny​(int fieldIndex,
                       java.lang.Class<? extends T> type)
                throws DataAccessException
        Execute the query and return at most one resulting value for a field index from the generated result.

        This is the same as calling fetchOne() and then Record.get(int, Class)

        Returns:
        The resulting value or null if the query returned no records.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchAny

        <U> U fetchAny​(int fieldIndex,
                       Converter<?,​? extends U> converter)
                throws DataAccessException
        Execute the query and return at most one resulting value for a field index from the generated result.

        This is the same as calling fetchOne() and then Record.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

        java.lang.Object fetchAny​(java.lang.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 then Record.get(String)

        Returns:
        The resulting value or null if the query returned no records.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchAny

        <T> T fetchAny​(java.lang.String fieldName,
                       java.lang.Class<? extends T> type)
                throws DataAccessException
        Execute the query and return at most one resulting value for a field name from the generated result.

        This is the same as calling fetchOne() and then Record.get(String, Class)

        Returns:
        The resulting value or null if the query returned no records.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchAny

        <U> U fetchAny​(java.lang.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 then Record.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

        java.lang.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 then Record.get(Name)

        Returns:
        The resulting value or null if the query returned no records.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchAny

        <T> T fetchAny​(Name fieldName,
                       java.lang.Class<? extends T> type)
                throws DataAccessException
        Execute the query and return at most one resulting value for a field name from the generated result.

        This is the same as calling fetchOne() and then Record.get(Name, Class)

        Returns:
        The resulting value or null if the query returned no records.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchAny

        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. Use Settings.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

        java.util.Map<java.lang.String,​java.lang.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

        java.lang.Object[] fetchAnyArray()
                                  throws DataAccessException
        Execute the query and return at most one resulting record as an array

        You can access data like this

        query.fetchAnyArray()[fieldIndex]
        Returns:
        The resulting record or null if the query returns no records.
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchAnyInto

        <E> E fetchAnyInto​(java.lang.Class<? extends E> type)
                    throws DataAccessException,
                           MappingException
        Map resulting records onto a custom type.

        This is the same as calling

         E result = null;
         Record r = q.fetchAny();
        
         if (r != null)
             result = r.into(type);
         
        . See 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Record.into(Class), Result.into(Class), DefaultRecordMapper
      • fetchMap

        <K> java.util.Map<K,​R> fetchMap​(Field<K> key)
                                       throws DataAccessException
        Execute the query and return a Map 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-unique

        The resulting records are attached to the original Configuration by default. Use Settings.isAttachRecords() to override this behaviour.

        Type Parameters:
        K - The key's generic field type
        Parameters:
        key - The key field. Client code must assure that this field is unique in the result set.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key field returned two or more equal values from the result set.
        See Also:
        Result.intoMap(Field)
      • fetchMap

        java.util.Map<?,​R> fetchMap​(int keyFieldIndex)
                                   throws DataAccessException
        Execute the query and return a Map 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-unique

        The resulting records are attached to the original Configuration by default. Use Settings.isAttachRecords() to override this behaviour.

        Parameters:
        keyFieldIndex - The key field. Client code must assure that this field is unique in the result set.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key field returned two or more equal values from the result set.
        See Also:
        Result.intoMap(int)
      • fetchMap

        java.util.Map<?,​R> fetchMap​(java.lang.String keyFieldName)
                                   throws DataAccessException
        Execute the query and return a Map 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-unique

        The resulting records are attached to the original Configuration by default. Use Settings.isAttachRecords() to override this behaviour.

        Parameters:
        keyFieldName - The key field. Client code must assure that this field is unique in the result set.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key field returned two or more equal values from the result set.
        See Also:
        Result.intoMap(String)
      • fetchMap

        java.util.Map<?,​R> fetchMap​(Name keyFieldName)
                                   throws DataAccessException
        Execute the query and return a Map 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-unique

        The resulting records are attached to the original Configuration by default. Use Settings.isAttachRecords() to override this behaviour.

        Parameters:
        keyFieldName - The key field. Client code must assure that this field is unique in the result set.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key field returned two or more equal values from the result set.
        See Also:
        Result.intoMap(Name)
      • fetchMap

        <K,​V> java.util.Map<K,​V> fetchMap​(Field<K> key,
                                                      Field<V> value)
                                               throws DataAccessException
        Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value

        An exception is thrown, if the key turns out to be non-unique in the result set. Use fetchGroups(Field, Field) instead, if your keys are non-unique

        Type Parameters:
        K - The key's generic field type
        V - 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 query
        InvalidResultException - if the key field returned two or more equal values from the result set.
        See Also:
        Result.intoMap(Field, Field)
      • fetchMap

        java.util.Map<?,​?> fetchMap​(int keyFieldIndex,
                                          int valueFieldIndex)
                                   throws DataAccessException
        Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value

        An exception is thrown, if the key turns out to be non-unique in the result set. Use fetchGroups(int, int) instead, if your keys are non-unique

        Parameters:
        keyFieldIndex - The key field. Client code must assure that this field is unique in the result set.
        valueFieldIndex - The value field
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key field returned two or more equal values from the result set.
        See Also:
        Result.intoMap(int, int)
      • fetchMap

        java.util.Map<?,​?> fetchMap​(java.lang.String keyFieldName,
                                          java.lang.String valueFieldName)
                                   throws DataAccessException
        Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value

        An exception is thrown, if the key turns out to be non-unique in the result set. Use fetchGroups(String, String) instead, if your keys are non-unique

        Parameters:
        keyFieldName - The key field. Client code must assure that this field is unique in the result set.
        valueFieldName - The value field
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key field returned two or more equal values from the result set.
        See Also:
        Result.intoMap(String, String)
      • fetchMap

        java.util.Map<?,​?> fetchMap​(Name keyFieldName,
                                          Name valueFieldName)
                                   throws DataAccessException
        Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value

        An exception is thrown, if the key turns out to be non-unique in the result set. Use fetchGroups(Name, Name) instead, if your keys are non-unique

        Parameters:
        keyFieldName - The key field. Client code must assure that this field is unique in the result set.
        valueFieldName - The value field
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key field returned two or more equal values from the result set.
        See Also:
        Result.intoMap(Name, Name)
      • fetchMap

        java.util.Map<Record,​R> fetchMap​(Field<?>[] keys)
                                        throws DataAccessException
        Execute the query and return a Map with keys as a map key and the corresponding record as value.

        An exception is thrown, if the keys turn out to be non-unique in the result set. Use fetchGroups(Field[]) instead, if your keys are non-unique.

        Parameters:
        keys - The keys. Client code must assure that keys are unique in the result set.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key list is non-unique in the result set.
        See Also:
        Result.intoMap(Field[])
      • fetchMap

        java.util.Map<Record,​R> fetchMap​(int[] keyFieldIndexes)
                                        throws DataAccessException
        Execute the query and return a Map with keys as a map key and the corresponding record as value.

        An exception is thrown, if the keys turn out to be non-unique in the result set. Use fetchGroups(int[]) instead, if your keys are non-unique.

        Parameters:
        keyFieldIndexes - The keys. Client code must assure that keys are unique in the result set.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key list is non-unique in the result set.
        See Also:
        Result.intoMap(int[])
      • fetchMap

        java.util.Map<Record,​R> fetchMap​(java.lang.String[] keyFieldNames)
                                        throws DataAccessException
        Execute the query and return a Map with keys as a map key and the corresponding record as value.

        An exception is thrown, if the keys turn out to be non-unique in the result set. Use fetchGroups(String[]) instead, if your keys are non-unique.

        Parameters:
        keyFieldNames - The keys. Client code must assure that keys are unique in the result set.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key list is non-unique in the result set.
        See Also:
        Result.intoMap(String[])
      • fetchMap

        java.util.Map<Record,​R> fetchMap​(Name[] keyFieldNames)
                                        throws DataAccessException
        Execute the query and return a Map with keys as a map key and the corresponding record as value.

        An exception is thrown, if the keys turn out to be non-unique in the result set. Use fetchGroups(Name[]) instead, if your keys are non-unique.

        Parameters:
        keyFieldNames - The keys. Client code must assure that keys are unique in the result set.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key list is non-unique in the result set.
        See Also:
        Result.intoMap(Name[])
      • fetchMap

        java.util.Map<Record,​Record> fetchMap​(Field<?>[] keys,
                                                    Field<?>[] values)
                                             throws DataAccessException
        Execute the query and return a Map with keys as a map key and the corresponding record as value.

        An exception is thrown, if the keys turn out to be non-unique in the result set. Use fetchGroups(Field[], Field[]) instead, if your keys are non-unique.

        Parameters:
        keys - The keys. Client code must assure that keys are unique in the result set.
        values - The values.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key list is non-unique in the result set.
        See Also:
        Result.intoMap(Field[], Field[])
      • fetchMap

        java.util.Map<Record,​Record> fetchMap​(int[] keyFieldIndexes,
                                                    int[] valueFieldIndexes)
                                             throws DataAccessException
        Execute the query and return a Map with keys as a map key and the corresponding record as value.

        An exception is thrown, if the keys turn out to be non-unique in the result set. Use fetchGroups(int[], int[]) instead, if your keys are non-unique.

        Parameters:
        keyFieldIndexes - The keys. Client code must assure that keys are unique in the result set.
        valueFieldIndexes - The values.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key list is non-unique in the result set.
        See Also:
        Result.intoMap(int[], int[])
      • fetchMap

        java.util.Map<Record,​Record> fetchMap​(java.lang.String[] keyFieldNames,
                                                    java.lang.String[] valueFieldNames)
                                             throws DataAccessException
        Execute the query and return a Map with keys as a map key and the corresponding record as value.

        An exception is thrown, if the keys turn out to be non-unique in the result set. Use fetchGroups(String[], String[]) instead, if your keys are non-unique.

        Parameters:
        keyFieldNames - The keys. Client code must assure that keys are unique in the result set.
        valueFieldNames - The values.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key list is non-unique in the result set.
        See Also:
        Result.intoMap(String[], String[])
      • fetchMap

        java.util.Map<Record,​Record> fetchMap​(Name[] keyFieldNames,
                                                    Name[] valueFieldNames)
                                             throws DataAccessException
        Execute the query and return a Map with keys as a map key and the corresponding record as value.

        An exception is thrown, if the keys turn out to be non-unique in the result set. Use fetchGroups(Name[], Name[]) instead, if your keys are non-unique.

        Parameters:
        keyFieldNames - The keys. Client code must assure that keys are unique in the result set.
        valueFieldNames - The values.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key list is non-unique in the result set.
        See Also:
        Result.intoMap(Name[], Name[])
      • fetchMap

        <E> java.util.Map<java.util.List<?>,​E> fetchMap​(Field<?>[] keys,
                                                              java.lang.Class<? extends E> type)
                                                       throws DataAccessException,
                                                              MappingException
        Execute the query and return a Map 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. Use fetchGroups(Field[], Class) instead, if your keys are non-unique.

        Parameters:
        keys - The keys. Client code must assure that keys are unique in the result set. If this is null 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 query
        InvalidResultException - if the keys are non-unique in the result set.
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoMap(Field[], Class), DefaultRecordMapper
      • fetchMap

        <E> java.util.Map<java.util.List<?>,​E> fetchMap​(int[] keyFieldIndexes,
                                                              java.lang.Class<? extends E> type)
                                                       throws DataAccessException,
                                                              MappingException
        Execute the query and return a Map 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. Use fetchGroups(int[], Class) instead, if your keys are non-unique.

        Parameters:
        keyFieldIndexes - The keys. Client code must assure that keys are unique in the result set. If this is null 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 query
        InvalidResultException - if the keys are non-unique in the result set.
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoMap(int[], Class), DefaultRecordMapper
      • fetchMap

        <E> java.util.Map<java.util.List<?>,​E> fetchMap​(java.lang.String[] keyFieldNames,
                                                              java.lang.Class<? extends E> type)
                                                       throws DataAccessException,
                                                              MappingException
        Execute the query and return a Map 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. Use fetchGroups(String[], Class) instead, if your keys are non-unique.

        Parameters:
        keyFieldNames - The keys. Client code must assure that keys are unique in the result set. If this is null 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 query
        InvalidResultException - if the keys are non-unique in the result set.
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoMap(String[], Class), DefaultRecordMapper
      • fetchMap

        <E> java.util.Map<java.util.List<?>,​E> fetchMap​(Name[] keyFieldNames,
                                                              java.lang.Class<? extends E> type)
                                                       throws DataAccessException,
                                                              MappingException
        Execute the query and return a Map 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. Use fetchGroups(Name[], Class) instead, if your keys are non-unique.

        Parameters:
        keyFieldNames - The keys. Client code must assure that keys are unique in the result set. If this is null 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 query
        InvalidResultException - if the keys are non-unique in the result set.
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoMap(Name[], Class), DefaultRecordMapper
      • fetchMap

        <E> java.util.Map<java.util.List<?>,​E> fetchMap​(int[] keyFieldIndexes,
                                                              RecordMapper<? super R,​E> mapper)
                                                       throws DataAccessException,
                                                              MappingException
        Execute the query and return a Map 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. Use fetchGroups(int[], RecordMapper) instead, if your keys are non-unique.

        Parameters:
        keyFieldIndexes - The keys. Client code must assure that keys are unique in the result set. If this is null 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 query
        InvalidResultException - if the keys are non-unique in the result set.
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoMap(int[], Class), DefaultRecordMapper
      • fetchMap

        <E> java.util.Map<java.util.List<?>,​E> fetchMap​(java.lang.String[] keyFieldNames,
                                                              RecordMapper<? super R,​E> mapper)
                                                       throws DataAccessException,
                                                              MappingException
        Execute the query and return a Map 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. Use fetchGroups(String[], RecordMapper) instead, if your keys are non-unique.

        Parameters:
        keyFieldNames - The keys. Client code must assure that keys are unique in the result set. If this is null 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 query
        InvalidResultException - 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

        <K> java.util.Map<K,​R> fetchMap​(java.lang.Class<? extends K> keyType)
                                       throws DataAccessException,
                                              MappingException,
                                              InvalidResultException
        Execute the query and return a Map with results grouped by the given key entity.

        The grouping semantics is governed by the key type's Object.equals(Object) and Object.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. Use fetchGroups(Class) instead, if your keys are non-unique.

        Parameters:
        keyType - The key type. If this is null, 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
        InvalidResultException - if the key list is non-unique in the result set.
        DataAccessException
        See Also:
        Result.intoMap(Class), DefaultRecordMapper
      • fetchMap

        <K,​V> java.util.Map<K,​V> fetchMap​(java.lang.Class<? extends K> keyType,
                                                      java.lang.Class<? extends V> valueType)
                                               throws DataAccessException,
                                                      MappingException,
                                                      InvalidResultException
        Execute the query and return a Map 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) and Object.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. Use fetchGroups(Class, Class) instead, if your keys are non-unique.

        Parameters:
        keyType - The key type. If this is null, 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
        InvalidResultException - if the key list is non-unique in the result set.
        DataAccessException
        See Also:
        Result.intoMap(Class, Class), DefaultRecordMapper
      • fetchMap

        <S extends Record> java.util.Map<S,​R> fetchMap​(Table<S> table)
                                                      throws DataAccessException
        Execute the query and return a Map 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. Use fetchGroups(Table) instead, if your keys are non-unique.

        Parameters:
        table - The key table. Client code must assure that keys are unique in the result set. May not be null.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key list is non-unique in the result set.
        See Also:
        Result.intoMap(Table)
      • fetchMap

        <S extends Record,​T extends Record> java.util.Map<S,​T> fetchMap​(Table<S> keyTable,
                                                                                    Table<T> valueTable)
                                                                             throws DataAccessException
        Execute the query and return a Map 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. Use fetchGroups(Table, Table) instead, if your keys are non-unique.

        Parameters:
        keyTable - The key table. Client code must assure that keys are unique in the result set. May not be null.
        valueTable - The value table. May not be null.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key list is non-unique in the result set.
        See Also:
        Result.intoMap(Table, Table)
      • fetchMap

        <K,​E> java.util.Map<K,​E> fetchMap​(Field<K> key,
                                                      java.lang.Class<? extends E> type)
                                               throws DataAccessException
        Execute the query and return a Map with results grouped by the given key and mapped into the given entity type.

        An exception is thrown, if the key turn out to be non-unique in the result set. Use fetchGroups(Field, Class) instead, if your key is non-unique.

        Parameters:
        key - The key. Client code must assure that key is unique in the result set.
        type - The entity type.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key is non-unique in the result set.
        See Also:
        Result.intoMap(Field, Class)
      • fetchMap

        <E> java.util.Map<?,​E> fetchMap​(int keyFieldIndex,
                                              java.lang.Class<? extends E> type)
                                       throws DataAccessException
        Execute the query and return a Map with results grouped by the given key and mapped into the given entity type.

        An exception is thrown, if the key turn out to be non-unique in the result set. Use fetchGroups(int, Class) instead, if your key is non-unique.

        Parameters:
        keyFieldIndex - The key. Client code must assure that key is unique in the result set.
        type - The entity type.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key is non-unique in the result set.
        See Also:
        Result.intoMap(int, Class)
      • fetchMap

        <E> java.util.Map<?,​E> fetchMap​(java.lang.String keyFieldName,
                                              java.lang.Class<? extends E> type)
                                       throws DataAccessException
        Execute the query and return a Map with results grouped by the given key and mapped into the given entity type.

        An exception is thrown, if the key turn out to be non-unique in the result set. Use fetchGroups(String, Class) instead, if your key is non-unique.

        Parameters:
        keyFieldName - The key. Client code must assure that key is unique in the result set.
        type - The entity type.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key is non-unique in the result set.
        See Also:
        Result.intoMap(String, Class)
      • fetchMap

        <E> java.util.Map<?,​E> fetchMap​(Name keyFieldName,
                                              java.lang.Class<? extends E> type)
                                       throws DataAccessException
        Execute the query and return a Map with results grouped by the given key and mapped into the given entity type.

        An exception is thrown, if the key turn out to be non-unique in the result set. Use fetchGroups(Name, Class) instead, if your key is non-unique.

        Parameters:
        keyFieldName - The key. Client code must assure that key is unique in the result set.
        type - The entity type.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key is non-unique in the result set.
        See Also:
        Result.intoMap(Name, Class)
      • fetchMap

        <K,​E> java.util.Map<K,​E> fetchMap​(Field<K> key,
                                                      RecordMapper<? super R,​E> mapper)
                                               throws DataAccessException
        Execute the query and return a Map with results grouped by the given key and mapped by the given mapper.

        An exception is thrown, if the key turn out to be non-unique in the result set. Use fetchGroups(Field, Class) instead, if your key is non-unique.

        Parameters:
        key - The key. Client code must assure that key is unique in the result set.
        mapper - The mapper callback.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key is non-unique in the result set.
        See Also:
        Result.intoMap(Field, Class)
      • fetchMap

        <E> java.util.Map<?,​E> fetchMap​(int keyFieldIndex,
                                              RecordMapper<? super R,​E> mapper)
                                       throws DataAccessException
        Execute the query and return a Map with results grouped by the given key and mapped by the given mapper.

        An exception is thrown, if the key turn out to be non-unique in the result set. Use fetchGroups(int, Class) instead, if your key is non-unique.

        Parameters:
        keyFieldIndex - The key. Client code must assure that key is unique in the result set.
        mapper - The mapper callback.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key is non-unique in the result set.
        See Also:
        Result.intoMap(int, Class)
      • fetchMap

        <E> java.util.Map<?,​E> fetchMap​(java.lang.String keyFieldName,
                                              RecordMapper<? super R,​E> mapper)
                                       throws DataAccessException
        Execute the query and return a Map with results grouped by the given key and mapped by the given mapper.

        An exception is thrown, if the key turn out to be non-unique in the result set. Use fetchGroups(String, Class) instead, if your key is non-unique.

        Parameters:
        keyFieldName - The key. Client code must assure that key is unique in the result set.
        mapper - The mapper callback.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key is non-unique in the result set.
        See Also:
        Result.intoMap(String, Class)
      • fetchMap

        <E> java.util.Map<?,​E> fetchMap​(Name keyFieldName,
                                              RecordMapper<? super R,​E> mapper)
                                       throws DataAccessException
        Execute the query and return a Map with results grouped by the given key and mapped by the given mapper.

        An exception is thrown, if the key turn out to be non-unique in the result set. Use fetchGroups(Name, Class) instead, if your key is non-unique.

        Parameters:
        keyFieldName - The key. Client code must assure that key is unique in the result set.
        mapper - The mapper callback.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        InvalidResultException - if the key is non-unique in the result set.
        See Also:
        Result.intoMap(Name, Class)
      • fetchGroups

        <K> java.util.Map<K,​Result<R>> fetchGroups​(Field<K> key)
                                                  throws DataAccessException
        Execute the query and return a Map 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. Use Settings.isAttachRecords() to override this behaviour.

        Type Parameters:
        K - The key's generic field type
        Parameters:
        key - The key field.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoGroups(Field)
      • fetchGroups

        java.util.Map<?,​Result<R>> fetchGroups​(int keyFieldIndex)
                                              throws DataAccessException
        Execute the query and return a Map 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. Use Settings.isAttachRecords() to override this behaviour.

        Parameters:
        keyFieldIndex - The key field index.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoGroups(int)
      • fetchGroups

        java.util.Map<?,​Result<R>> fetchGroups​(java.lang.String keyFieldName)
                                              throws DataAccessException
        Execute the query and return a Map 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. Use Settings.isAttachRecords() to override this behaviour.

        Parameters:
        keyFieldName - The key field name.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoGroups(String)
      • fetchGroups

        java.util.Map<?,​Result<R>> fetchGroups​(Name keyFieldName)
                                              throws DataAccessException
        Execute the query and return a Map 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. Use Settings.isAttachRecords() to override this behaviour.

        Parameters:
        keyFieldName - The key field name.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoGroups(Name)
      • fetchGroups

        <K,​V> java.util.Map<K,​java.util.List<V>> fetchGroups​(Field<K> key,
                                                                         Field<V> value)
                                                                  throws DataAccessException
        Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value

        Unlike fetchMap(Field, Field), this method allows for non-unique keys in the result set.

        Type Parameters:
        K - The key's generic field type
        V - 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

        java.util.Map<?,​java.util.List<?>> fetchGroups​(int keyFieldIndex,
                                                             int valueFieldIndex)
                                                      throws DataAccessException
        Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value

        Unlike fetchMap(int, int), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldIndex - The key field index.
        valueFieldIndex - The value field index.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoGroups(int, int)
      • fetchGroups

        java.util.Map<?,​java.util.List<?>> fetchGroups​(java.lang.String keyFieldName,
                                                             java.lang.String valueFieldName)
                                                      throws DataAccessException
        Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value

        Unlike fetchMap(String, String), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldName - The key field name.
        valueFieldName - The value field name.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoGroups(String, String)
      • fetchGroups

        java.util.Map<?,​java.util.List<?>> fetchGroups​(Name keyFieldName,
                                                             Name valueFieldName)
                                                      throws DataAccessException
        Execute the query and return a Map with one of the result's columns as key and another one of the result's columns as value

        Unlike fetchMap(Name, Name), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldName - The key field name.
        valueFieldName - The value field name.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoGroups(Name, Name)
      • fetchGroups

        java.util.Map<Record,​Result<R>> fetchGroups​(Field<?>[] keys)
                                                   throws DataAccessException
        Execute the query and return a Map with the result grouped by the given keys.

        Unlike fetchMap(Field[]), this method allows for non-unique keys in the result set.

        Parameters:
        keys - The keys used for result grouping. If this is null 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

        java.util.Map<Record,​Result<R>> fetchGroups​(int[] keyFieldIndexes)
                                                   throws DataAccessException
        Execute the query and return a Map with the result grouped by the given keys.

        Unlike fetchMap(int[]), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldIndexes - The keys used for result grouping. If this is null 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

        java.util.Map<Record,​Result<R>> fetchGroups​(java.lang.String[] keyFieldNames)
                                                   throws DataAccessException
        Execute the query and return a Map with the result grouped by the given keys.

        Unlike fetchMap(String[]), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldNames - The keys used for result grouping. If this is null 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

        java.util.Map<Record,​Result<R>> fetchGroups​(Name[] keyFieldNames)
                                                   throws DataAccessException
        Execute the query and return a Map with the result grouped by the given keys.

        Unlike fetchMap(Name[]), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldNames - The keys used for result grouping. If this is null 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

        java.util.Map<Record,​Result<Record>> fetchGroups​(Field<?>[] keys,
                                                               Field<?>[] values)
                                                        throws DataAccessException
        Execute the query and return a Map with the result grouped by the given keys.

        Unlike fetchMap(Field[], Field[]), this method allows for non-unique keys in the result set.

        Parameters:
        keys - The keys used for result grouping. If this is null 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

        java.util.Map<Record,​Result<Record>> fetchGroups​(int[] keyFieldIndexes,
                                                               int[] valueFieldIndexes)
                                                        throws DataAccessException
        Execute the query and return a Map with the result grouped by the given keys.

        Unlike fetchMap(int[], int[]), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldIndexes - The keys used for result grouping. If this is null 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

        java.util.Map<Record,​Result<Record>> fetchGroups​(java.lang.String[] keyFieldNames,
                                                               java.lang.String[] valueFieldNames)
                                                        throws DataAccessException
        Execute the query and return a Map with the result grouped by the given keys.

        Unlike fetchMap(String[], String[]), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldNames - The keys used for result grouping. If this is null 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

        java.util.Map<Record,​Result<Record>> fetchGroups​(Name[] keyFieldNames,
                                                               Name[] valueFieldNames)
                                                        throws DataAccessException
        Execute the query and return a Map with the result grouped by the given keys.

        Unlike fetchMap(Name[], Name[]), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldNames - The keys used for result grouping. If this is null or an empty array, the resulting map will contain at most one entry.
        valueFieldNames - The values returned per group.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoGroups(Name[], Name[])
      • fetchGroups

        <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(Field<?>[] keys,
                                                                      java.lang.Class<? extends E> type)
                                                               throws MappingException
        Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.

        Unlike fetchMap(Field[], Class), this method allows for non-unique keys in the result set.

        Parameters:
        keys - The keys. If this is null 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(Field[], Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(int[] keyFieldIndexes,
                                                                      java.lang.Class<? extends E> type)
                                                               throws MappingException
        Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.

        Unlike fetchMap(int[], Class), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldIndexes - The keys. If this is null 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(int[], Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(java.lang.String[] keyFieldNames,
                                                                      java.lang.Class<? extends E> type)
                                                               throws MappingException
        Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.

        Unlike fetchMap(String[], Class), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldNames - The keys. If this is null 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(String[], Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(Name[] keyFieldNames,
                                                                      java.lang.Class<? extends E> type)
                                                               throws MappingException
        Execute the query and return a Map with results grouped by the given keys and mapped into the given entity type.

        Unlike fetchMap(Name[], Class), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldNames - The keys. If this is null 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(Name[], Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(Field<?>[] keys,
                                                                      RecordMapper<? super R,​E> mapper)
                                                               throws MappingException
        Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.

        Unlike fetchMap(Field[], RecordMapper), this method allows for non-unique keys in the result set.

        Parameters:
        keys - The keys. If this is null 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(Field[], Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(int[] keyFieldIndexes,
                                                                      RecordMapper<? super R,​E> mapper)
                                                               throws MappingException
        Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.

        Unlike fetchMap(int[], RecordMapper), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldIndexes - The keys. If this is null 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(int[], Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(java.lang.String[] keyFieldNames,
                                                                      RecordMapper<? super R,​E> mapper)
                                                               throws MappingException
        Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.

        Unlike fetchMap(String[], RecordMapper), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldNames - The keys. If this is null 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(String[], Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<Record,​java.util.List<E>> fetchGroups​(Name[] keyFieldNames,
                                                                      RecordMapper<? super R,​E> mapper)
                                                               throws MappingException
        Execute the query and return a Map with results grouped by the given keys and mapped by the given mapper.

        Unlike fetchMap(Name[], RecordMapper), this method allows for non-unique keys in the result set.

        Parameters:
        keyFieldNames - The keys. If this is null 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(Name[], Class), DefaultRecordMapper
      • fetchGroups

        <K> java.util.Map<K,​Result<R>> fetchGroups​(java.lang.Class<? extends K> keyType)
                                                  throws MappingException
        Execute the query and return a Map with results grouped by the given key entity.

        The grouping semantics is governed by the key type's Object.equals(Object) and Object.hashCode() implementation, not necessarily the values as fetched from the database.

        Unlike fetchMap(Class), this method allows for non-unique keys in the result set.

        Parameters:
        keyType - The key type. If this is null, the resulting map will contain at most one entry.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        DefaultRecordMapper
      • fetchGroups

        <K,​V> java.util.Map<K,​java.util.List<V>> fetchGroups​(java.lang.Class<? extends K> keyType,
                                                                         java.lang.Class<? extends V> valueType)
                                                                  throws MappingException
        Execute the query and return a Map 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) and Object.hashCode() implementation, not necessarily the values as fetched from the database.

        Unlike fetchMap(Class, Class), this method allows for non-unique keys in the result set.

        Parameters:
        keyType - The key type. If this is null, the resulting map will contain at most one entry.
        valueType - The value type.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        DefaultRecordMapper
      • fetchGroups

        <K,​V> java.util.Map<K,​java.util.List<V>> fetchGroups​(java.lang.Class<? extends K> keyType,
                                                                         RecordMapper<? super R,​V> valueMapper)
                                                                  throws MappingException
        Execute the query and return a Map 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) and Object.hashCode() implementation, not necessarily the values as fetched from the database.

        Unlike fetchMap(Class, RecordMapper), this method allows for non-unique keys in the result set.

        Parameters:
        keyType - The key type. If this is null, the resulting map will contain at most one entry.
        valueMapper - The value mapper.
        Returns:
        A Map containing grouped results. This will never be null.
        Throws:
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        DefaultRecordMapper
      • fetchGroups

        <K> java.util.Map<K,​Result<R>> fetchGroups​(RecordMapper<? super R,​K> keyMapper)
                                                  throws MappingException
        Execute the query and return a Map 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) and Object.hashCode() implementation, not necessarily the values as fetched from the database.

        Unlike fetchMap(RecordMapper, RecordMapper), this method allows for non-unique keys in the result set.

        Parameters:
        keyMapper - The key mapper.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        DefaultRecordMapper
      • fetchGroups

        <K,​V> java.util.Map<K,​java.util.List<V>> fetchGroups​(RecordMapper<? super R,​K> keyMapper,
                                                                         java.lang.Class<V> valueType)
                                                                  throws MappingException
        Execute the query and return a Map 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) and Object.hashCode() implementation, not necessarily the values as fetched from the database.

        Unlike fetchMap(RecordMapper, Class), this method allows for non-unique keys in the result set.

        Parameters:
        keyMapper - The key mapper.
        valueType - The value type.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        DefaultRecordMapper
      • fetchGroups

        <K,​V> java.util.Map<K,​java.util.List<V>> fetchGroups​(RecordMapper<? super R,​K> keyMapper,
                                                                         RecordMapper<? super R,​V> valueMapper)
                                                                  throws MappingException
        Execute the query and return a Map 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) and Object.hashCode() implementation, not necessarily the values as fetched from the database.

        Unlike fetchMap(RecordMapper, RecordMapper), this method allows for non-unique keys in the result set.

        Parameters:
        keyMapper - The key mapper.
        valueMapper - The value mapper.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        DefaultRecordMapper
      • fetchGroups

        <S extends Record> java.util.Map<S,​Result<R>> fetchGroups​(Table<S> table)
                                                                 throws DataAccessException
        Execute the query and return a Map with the result grouped by the given table.

        Unlike fetchMap(Table), this method allows for non-unique keys in the result set.

        Parameters:
        table - The key table. May not be null.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoGroups(Table)
      • fetchGroups

        <S extends Record,​T extends Record> java.util.Map<S,​Result<T>> fetchGroups​(Table<S> keyTable,
                                                                                               Table<T> valueTable)
                                                                                        throws DataAccessException
        Execute the query and return a Map with the result grouped by the given table.

        Unlike fetchMap(Table, Table), this method allows for non-unique keys in the result set.

        Parameters:
        keyTable - The key table. May not be null.
        valueTable - The value table. May not be null.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoGroups(Table, Table)
      • fetchGroups

        <E,​S extends Record> java.util.Map<S,​java.util.List<E>> fetchGroups​(Table<S> table,
                                                                                        java.lang.Class<? extends E> type)
                                                                                 throws DataAccessException,
                                                                                        MappingException
        Execute the query and return a Map with results grouped by the given table and mapped into the given entity type.

        Unlike fetchMap(Table, Class), this method allows for non-unique keys in the result set.

        Parameters:
        table - The key table. May not be null.
        type - The entity type.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(Table, Class), DefaultRecordMapper
      • fetchGroups

        <K,​E> java.util.Map<K,​java.util.List<E>> fetchGroups​(Field<K> key,
                                                                         java.lang.Class<? extends E> type)
                                                                  throws DataAccessException,
                                                                         MappingException
        Return a Map with results grouped by the given key and mapped into the given entity type.
        Type Parameters:
        K - The key's generic field type
        E - 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(Field, Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(int keyFieldIndex,
                                                                 java.lang.Class<? extends E> type)
                                                          throws DataAccessException,
                                                                 MappingException
        Return a Map with results grouped by the given key and mapped into the given entity type.
        Parameters:
        keyFieldIndex - The key field index.
        type - The entity type.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(int, Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(java.lang.String keyFieldName,
                                                                 java.lang.Class<? extends E> type)
                                                          throws DataAccessException,
                                                                 MappingException
        Return a Map with results grouped by the given key and mapped into the given entity type.
        Parameters:
        keyFieldName - The key field name.
        type - The entity type.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(String, Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(Name keyFieldName,
                                                                 java.lang.Class<? extends E> type)
                                                          throws DataAccessException,
                                                                 MappingException
        Return a Map with results grouped by the given key and mapped into the given entity type.
        Parameters:
        keyFieldName - The key field name.
        type - The entity type.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(Name, Class), DefaultRecordMapper
      • fetchGroups

        <K,​E> java.util.Map<K,​java.util.List<E>> fetchGroups​(Field<K> key,
                                                                         RecordMapper<? super R,​E> mapper)
                                                                  throws DataAccessException,
                                                                         MappingException
        Return a Map with results grouped by the given key and mapped by the given mapper.
        Type Parameters:
        K - The key's generic field type
        E - 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 query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(Field, Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(int keyFieldIndex,
                                                                 RecordMapper<? super R,​E> mapper)
                                                          throws DataAccessException,
                                                                 MappingException
        Return a Map with results grouped by the given key and mapped by the given mapper.
        Parameters:
        keyFieldIndex - The key field index.
        mapper - The mapper callback.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(int, Class), DefaultRecordMapper
      • fetchGroups

        <E> java.util.Map<?,​java.util.List<E>> fetchGroups​(java.lang.String keyFieldName,
                                                                 RecordMapper<? super R,​E> mapper)
                                                          throws DataAccessException,
                                                                 MappingException
        Return a Map with results grouped by the given key and mapped by the given mapper.
        Parameters:
        keyFieldName - The key field name.
        mapper - The mapper callback.
        Returns:
        A Map containing the results. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
        See Also:
        Result.intoGroups(String, Class), DefaultRecordMapper
      • fetchArrays

        java.lang.Object[][] fetchArrays()
                                  throws DataAccessException
        Execute the query and return the generated result as an Object matrix.

        You can access data like this

        query.fetchArray()[recordIndex][fieldIndex]
        Returns:
        The result. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArrays()
      • fetchArray

        R[] fetchArray()
                throws DataAccessException
        Execute the query and return the generated result as an array of records.

        Returns:
        The result. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        List.toArray(Object[])
      • fetchArray

        java.lang.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 about fieldIndex's actual type. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(int)
      • fetchArray

        <T> T[] fetchArray​(int fieldIndex,
                           java.lang.Class<? extends T> type)
                    throws DataAccessException
        Execute the query and return all values for a field index from the generated result.

        You can access data like this

        query.fetchArray(fieldIndex)[recordIndex]
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(int, Class)
      • fetchArray

        <U> U[] fetchArray​(int fieldIndex,
                           Converter<?,​? extends U> converter)
                    throws DataAccessException
        Execute the query and return all values for a field index from the generated result.

        You can access data like this

        query.fetchArray(fieldIndex)[recordIndex]
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(int, Converter)
      • fetchArray

        java.lang.Object[] fetchArray​(java.lang.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 about fieldName's actual type. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(String)
      • fetchArray

        <T> T[] fetchArray​(java.lang.String fieldName,
                           java.lang.Class<? extends T> type)
                    throws DataAccessException
        Execute the query and return all values for a field name from the generated result.

        You can access data like this

        query.fetchArray(fieldName)[recordIndex]
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(String, Converter)
      • fetchArray

        <U> U[] fetchArray​(java.lang.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

        java.lang.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 about fieldName's actual type. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(Name)
      • fetchArray

        <T> T[] fetchArray​(Name fieldName,
                           java.lang.Class<? extends T> type)
                    throws DataAccessException
        Execute the query and return all values for a field name from the generated result.

        You can access data like this

        query.fetchArray(fieldName)[recordIndex]
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(Name, Converter)
      • fetchArray

        <U> U[] fetchArray​(Name fieldName,
                           Converter<?,​? extends U> converter)
                    throws DataAccessException
        Execute the query and return all values for a field name from the generated result.

        You can access data like this

        query.fetchArray(fieldName)[recordIndex]
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(Name, Class)
      • fetchArray

        <T> T[] fetchArray​(Field<T> field)
                    throws DataAccessException
        Execute the query and return all values for a field from the generated result.

        You can access data like this

        query.fetchArray(field)[recordIndex]
        Returns:
        The result. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(Field)
      • fetchArray

        <T> T[] fetchArray​(Field<?> field,
                           java.lang.Class<? extends T> type)
                    throws DataAccessException
        Execute the query and return all values for a field from the generated result.

        You can access data like this

        query.fetchArray(field)[recordIndex]
        Returns:
        The result. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(Field, Class)
      • fetchArray

        <T,​U> U[] fetchArray​(Field<T> field,
                                   Converter<? super T,​? extends U> converter)
                            throws DataAccessException
        Execute the query and return all values for a field from the generated result.

        You can access data like this

        query.fetchArray(field)[recordIndex]
        Returns:
        The result. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(Field, Converter)
      • fetchSet

        <E> java.util.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

        java.util.Set<?> fetchSet​(int fieldIndex)
                           throws DataAccessException
        Execute the query and return all values for a field index from the generated result.
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(int)
      • fetchSet

        <T> java.util.Set<T> fetchSet​(int fieldIndex,
                                      java.lang.Class<? extends T> type)
                               throws DataAccessException
        Execute the query and return all values for a field index from the generated result.
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(int, Class)
      • fetchSet

        java.util.Set<?> fetchSet​(java.lang.String fieldName)
                           throws DataAccessException
        Execute the query and return all values for a field name from the generated result.
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(String)
      • fetchSet

        <T> java.util.Set<T> fetchSet​(java.lang.String fieldName,
                                      java.lang.Class<? extends T> type)
                               throws DataAccessException
        Execute the query and return all values for a field name from the generated result.
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(String, Converter)
      • fetchSet

        <U> java.util.Set<U> fetchSet​(java.lang.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

        java.util.Set<?> fetchSet​(Name fieldName)
                           throws DataAccessException
        Execute the query and return all values for a field name from the generated result.
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(Name)
      • fetchSet

        <T> java.util.Set<T> fetchSet​(Name fieldName,
                                      java.lang.Class<? extends T> type)
                               throws DataAccessException
        Execute the query and return all values for a field name from the generated result.
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(Name, Converter)
      • fetchSet

        <T> java.util.Set<T> fetchSet​(Field<T> field)
                               throws DataAccessException
        Execute the query and return all values for a field from the generated result.
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(Field)
      • fetchSet

        <T> java.util.Set<T> fetchSet​(Field<?> field,
                                      java.lang.Class<? extends T> type)
                               throws DataAccessException
        Execute the query and return all values for a field from the generated result.
        Returns:
        The resulting values. This will never be null.
        Throws:
        DataAccessException - if something went wrong executing the query
        See Also:
        Result.intoArray(Field, Class)
      • fetchInto

        <H extends RecordHandler<? super R>> H fetchInto​(H handler)
                                                  throws DataAccessException
        Fetch results into a custom handler callback.

        The resulting records are attached to the original Configuration by default. Use Settings.isAttachRecords() to override this behaviour.

        Parameters:
        handler - The handler callback
        Returns:
        Convenience result, returning the parameter handler itself
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetch

        <E> java.util.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

        java.util.concurrent.CompletionStage<Result<R>> fetchAsync()
        Fetch results in a new CompletionStage.

        The result is asynchronously completed by a task running in an Executor provided by the underlying Configuration.executorProvider().

        Returns:
        The completion stage. The completed result will never be null.
      • fetchAsync

        java.util.concurrent.CompletionStage<Result<R>> fetchAsync​(java.util.concurrent.Executor executor)
        Fetch results in a new CompletionStage that is asynchronously completed by a task running in the given executor.
        Returns:
        The completion stage. The completed result will never be null.
      • fetchLater

        @Deprecated
        FutureResult<R> fetchLater()
                            throws DataAccessException
        Deprecated.
        - 3.2.0 - [#2581] - This method will be removed in jOOQ 4.0
        Fetch 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. Use fetchLater(ExecutorService) instead, if you want control over your executing threads.

        The result and its contained records are attached to the original Configuration by default. Use Settings.isAttachRecords() to override this behaviour.

        Returns:
        A future result
        Throws:
        DataAccessException - if something went wrong executing the query
      • fetchLater

        @Deprecated
        FutureResult<R> fetchLater​(java.util.concurrent.ExecutorService executor)
                            throws DataAccessException
        Deprecated.
        - 3.2.0 - [#2581] - This method will be removed in jOOQ 4.0
        Fetch 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. Use Settings.isAttachRecords() to override this behaviour.

        Parameters:
        executor - A custom executor
        Returns:
        A future result
        Throws:
        DataAccessException - if something went wrong executing the query
      • getRecordType

        java.lang.Class<? extends R> getRecordType()
        The record type produced by this query.
      • bind

        ResultQuery<R> bind​(java.lang.String param,
                            java.lang.Object value)
                     throws java.lang.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 with StatementType.STATIC_STATEMENT and there is an underlying PreparedStatement kept open because of Query.keepStatement(boolean), the underlying PreparedStatement will be closed automatically in order for new bind values to have an effect.

        Specified by:
        bind in interface Query
        Parameters:
        param - The named parameter name. If this is a number, then this is the same as calling Query.bind(int, Object)
        value - The new bind value.
        Throws:
        java.lang.IllegalArgumentException - if there is no parameter by the given parameter name or index.
        DataTypeException - if value cannot be converted into the parameter's data type
      • bind

        ResultQuery<R> bind​(int index,
                            java.lang.Object value)
                     throws java.lang.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 with StatementType.STATIC_STATEMENT and there is an underlying PreparedStatement kept open because of Query.keepStatement(boolean), the underlying PreparedStatement will be closed automatically in order for new bind values to have an effect.

        Specified by:
        bind in interface Query
        Parameters:
        index - The parameter index, starting with 1
        value - The new bind value.
        Throws:
        java.lang.IllegalArgumentException - if there is no parameter by the given parameter index.
        DataTypeException - if value cannot be converted into the parameter's data type
      • poolable

        ResultQuery<R> poolable​(boolean poolable)
        Description copied from interface: Query
        Specify whether any JDBC Statement created by this query should be Statement.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 interface Query
        See Also:
        Statement.setPoolable(boolean)
      • queryTimeout

        ResultQuery<R> queryTimeout​(int timeout)
        Description copied from interface: Query
        Specify the query timeout in number of seconds for the underlying JDBC Statement.
        Specified by:
        queryTimeout in interface Query
        See Also:
        Statement.setQueryTimeout(int)
      • keepStatement

        ResultQuery<R> keepStatement​(boolean keepStatement)
        Description copied from interface: Query
        Keep the query's underlying statement open after execution.

        This indicates to jOOQ that the query's underlying Statement or PreparedStatement should be kept open after execution. If it is kept open, client code is responsible for properly closing it using Query.close()

        Specified by:
        keepStatement in interface Query
        Parameters:
        keepStatement - Whether to keep the underlying statement open
      • maxRows

        ResultQuery<R> maxRows​(int rows)
        Specify the maximum number of rows returned by the underlying Statement.

        This is not the same as setting a LIMIT .. OFFSET clause onto the statement, where the result set is restricted within the database.

        See Also:
        Statement.setMaxRows(int)
      • fetchSize

        ResultQuery<R> fetchSize​(int rows)
        Specify the fetch size of the underlying Statement.

        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 with ResultSet.TYPE_FORWARD_ONLY (set in resultSetType(int)) and ResultSet.CONCUR_READ_ONLY (set in resultSetConcurrency(int)). See this page here for details.
        • PostgreSQL does not like fetch sizes being combined with Connection.getAutoCommit() == true. For more information, see this page here
        See Also:
        Statement.setFetchSize(int)
      • resultSetConcurrency

        ResultQuery<R> resultSetConcurrency​(int resultSetConcurrency)
        Specify the ResultSet concurrency of ResultSet objects created by jOOQ.

        This will affect the way you may perceive ResultSet objects obtained from any of these methods:

        See Also:
        Statement.getResultSetConcurrency()
      • resultSetHoldability

        ResultQuery<R> resultSetHoldability​(int resultSetHoldability)
        Specify the ResultSet holdability of ResultSet objects created by jOOQ.

        This will affect the way you may perceive ResultSet objects obtained from any of these methods:

        See Also:
        Statement.getResultSetHoldability()
      • intern

        @Deprecated
        ResultQuery<R> intern​(Field<?>... fields)
        Deprecated.
        - 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0
        Specify a set of fields whose values should be interned.

        Unlike Result's intern() methods, this already interns values right after fetching them from a JDBC result set. See Result.intern(int...) for more details.

        Parameters:
        fields - The fields whose values should be interned
        Returns:
        The same result query
        See Also:
        Result.intern(Field...), String.intern()
      • intern

        @Deprecated
        ResultQuery<R> intern​(int... fieldIndexes)
        Deprecated.
        - 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0
        Specify a set of field indexes whose values should be interned.

        Unlike Result's intern() methods, this already interns values right after fetching them from a JDBC result set. See Result.intern(int...) for more details.

        Parameters:
        fieldIndexes - The field indexes whose values should be interned
        Returns:
        The same result query
        See Also:
        Result.intern(int...), String.intern()
      • intern

        @Deprecated
        ResultQuery<R> intern​(java.lang.String... fieldNames)
        Deprecated.
        - 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0
        Specify a set of field names whose values should be interned.

        Unlike Result's intern() methods, this already interns values right after fetching them from a JDBC result set. See Result.intern(String...) for more details.

        Parameters:
        fieldNames - The field names whose values should be interned
        Returns:
        The same result query
        See Also:
        Result.intern(String...), String.intern()
      • intern

        @Deprecated
        ResultQuery<R> intern​(Name... fieldNames)
        Deprecated.
        - 3.10 - [#6254] - This functionality is no longer supported and will be removed in 4.0
        Specify a set of field names whose values should be interned.

        Unlike Result's intern() methods, this already interns values right after fetching them from a JDBC result set. See Result.intern(Name...) for more details.

        Parameters:
        fieldNames - The field names whose values should be interned
        Returns:
        The same result query
        See Also:
        Result.intern(Name...), String.intern()
      • coerce

        <X extends RecordResultQuery<X> coerce​(Table<X> table)
        Coerce the result record type of this query to that of a table.
      • coerce

        ResultQuery<Record> coerce​(Field<?>... fields)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        ResultQuery<Record> coerce​(java.util.Collection<? extends Field<?>> fields)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1> ResultQuery<Record1<T1>> coerce​(Field<T1> field1)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2> ResultQuery<Record2<T1,​T2>> coerce​(Field<T1> field1,
                                                               Field<T2> field2)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3> ResultQuery<Record3<T1,​T2,​T3>> coerce​(Field<T1> field1,
                                                                                 Field<T2> field2,
                                                                                 Field<T3> field3)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4> ResultQuery<Record4<T1,​T2,​T3,​T4>> coerce​(Field<T1> field1,
                                                                                                   Field<T2> field2,
                                                                                                   Field<T3> field3,
                                                                                                   Field<T4> field4)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5> ResultQuery<Record5<T1,​T2,​T3,​T4,​T5>> coerce​(Field<T1> field1,
                                                                                                                     Field<T2> field2,
                                                                                                                     Field<T3> field3,
                                                                                                                     Field<T4> field4,
                                                                                                                     Field<T5> field5)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6> ResultQuery<Record6<T1,​T2,​T3,​T4,​T5,​T6>> coerce​(Field<T1> field1,
                                                                                                                                       Field<T2> field2,
                                                                                                                                       Field<T3> field3,
                                                                                                                                       Field<T4> field4,
                                                                                                                                       Field<T5> field5,
                                                                                                                                       Field<T6> field6)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7> ResultQuery<Record7<T1,​T2,​T3,​T4,​T5,​T6,​T7>> coerce​(Field<T1> field1,
                                                                                                                                                         Field<T2> field2,
                                                                                                                                                         Field<T3> field3,
                                                                                                                                                         Field<T4> field4,
                                                                                                                                                         Field<T5> field5,
                                                                                                                                                         Field<T6> field6,
                                                                                                                                                         Field<T7> field7)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8> ResultQuery<Record8<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>> coerce​(Field<T1> field1,
                                                                                                                                                                           Field<T2> field2,
                                                                                                                                                                           Field<T3> field3,
                                                                                                                                                                           Field<T4> field4,
                                                                                                                                                                           Field<T5> field5,
                                                                                                                                                                           Field<T6> field6,
                                                                                                                                                                           Field<T7> field7,
                                                                                                                                                                           Field<T8> field8)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9> ResultQuery<Record9<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9>> coerce​(Field<T1> field1,
                                                                                                                                                                                             Field<T2> field2,
                                                                                                                                                                                             Field<T3> field3,
                                                                                                                                                                                             Field<T4> field4,
                                                                                                                                                                                             Field<T5> field5,
                                                                                                                                                                                             Field<T6> field6,
                                                                                                                                                                                             Field<T7> field7,
                                                                                                                                                                                             Field<T8> field8,
                                                                                                                                                                                             Field<T9> field9)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10> ResultQuery<Record10<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                  Field<T2> field2,
                                                                                                                                                                                                                  Field<T3> field3,
                                                                                                                                                                                                                  Field<T4> field4,
                                                                                                                                                                                                                  Field<T5> field5,
                                                                                                                                                                                                                  Field<T6> field6,
                                                                                                                                                                                                                  Field<T7> field7,
                                                                                                                                                                                                                  Field<T8> field8,
                                                                                                                                                                                                                  Field<T9> field9,
                                                                                                                                                                                                                  Field<T10> field10)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11> ResultQuery<Record11<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                      Field<T2> field2,
                                                                                                                                                                                                                                      Field<T3> field3,
                                                                                                                                                                                                                                      Field<T4> field4,
                                                                                                                                                                                                                                      Field<T5> field5,
                                                                                                                                                                                                                                      Field<T6> field6,
                                                                                                                                                                                                                                      Field<T7> field7,
                                                                                                                                                                                                                                      Field<T8> field8,
                                                                                                                                                                                                                                      Field<T9> field9,
                                                                                                                                                                                                                                      Field<T10> field10,
                                                                                                                                                                                                                                      Field<T11> field11)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12> ResultQuery<Record12<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                          Field<T2> field2,
                                                                                                                                                                                                                                                          Field<T3> field3,
                                                                                                                                                                                                                                                          Field<T4> field4,
                                                                                                                                                                                                                                                          Field<T5> field5,
                                                                                                                                                                                                                                                          Field<T6> field6,
                                                                                                                                                                                                                                                          Field<T7> field7,
                                                                                                                                                                                                                                                          Field<T8> field8,
                                                                                                                                                                                                                                                          Field<T9> field9,
                                                                                                                                                                                                                                                          Field<T10> field10,
                                                                                                                                                                                                                                                          Field<T11> field11,
                                                                                                                                                                                                                                                          Field<T12> field12)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13> ResultQuery<Record13<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                                              Field<T2> field2,
                                                                                                                                                                                                                                                                              Field<T3> field3,
                                                                                                                                                                                                                                                                              Field<T4> field4,
                                                                                                                                                                                                                                                                              Field<T5> field5,
                                                                                                                                                                                                                                                                              Field<T6> field6,
                                                                                                                                                                                                                                                                              Field<T7> field7,
                                                                                                                                                                                                                                                                              Field<T8> field8,
                                                                                                                                                                                                                                                                              Field<T9> field9,
                                                                                                                                                                                                                                                                              Field<T10> field10,
                                                                                                                                                                                                                                                                              Field<T11> field11,
                                                                                                                                                                                                                                                                              Field<T12> field12,
                                                                                                                                                                                                                                                                              Field<T13> field13)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14> ResultQuery<Record14<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                                                                  Field<T2> field2,
                                                                                                                                                                                                                                                                                                  Field<T3> field3,
                                                                                                                                                                                                                                                                                                  Field<T4> field4,
                                                                                                                                                                                                                                                                                                  Field<T5> field5,
                                                                                                                                                                                                                                                                                                  Field<T6> field6,
                                                                                                                                                                                                                                                                                                  Field<T7> field7,
                                                                                                                                                                                                                                                                                                  Field<T8> field8,
                                                                                                                                                                                                                                                                                                  Field<T9> field9,
                                                                                                                                                                                                                                                                                                  Field<T10> field10,
                                                                                                                                                                                                                                                                                                  Field<T11> field11,
                                                                                                                                                                                                                                                                                                  Field<T12> field12,
                                                                                                                                                                                                                                                                                                  Field<T13> field13,
                                                                                                                                                                                                                                                                                                  Field<T14> field14)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15> ResultQuery<Record15<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                                                                                      Field<T2> field2,
                                                                                                                                                                                                                                                                                                                      Field<T3> field3,
                                                                                                                                                                                                                                                                                                                      Field<T4> field4,
                                                                                                                                                                                                                                                                                                                      Field<T5> field5,
                                                                                                                                                                                                                                                                                                                      Field<T6> field6,
                                                                                                                                                                                                                                                                                                                      Field<T7> field7,
                                                                                                                                                                                                                                                                                                                      Field<T8> field8,
                                                                                                                                                                                                                                                                                                                      Field<T9> field9,
                                                                                                                                                                                                                                                                                                                      Field<T10> field10,
                                                                                                                                                                                                                                                                                                                      Field<T11> field11,
                                                                                                                                                                                                                                                                                                                      Field<T12> field12,
                                                                                                                                                                                                                                                                                                                      Field<T13> field13,
                                                                                                                                                                                                                                                                                                                      Field<T14> field14,
                                                                                                                                                                                                                                                                                                                      Field<T15> field15)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16> ResultQuery<Record16<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                                                                                                          Field<T2> field2,
                                                                                                                                                                                                                                                                                                                                          Field<T3> field3,
                                                                                                                                                                                                                                                                                                                                          Field<T4> field4,
                                                                                                                                                                                                                                                                                                                                          Field<T5> field5,
                                                                                                                                                                                                                                                                                                                                          Field<T6> field6,
                                                                                                                                                                                                                                                                                                                                          Field<T7> field7,
                                                                                                                                                                                                                                                                                                                                          Field<T8> field8,
                                                                                                                                                                                                                                                                                                                                          Field<T9> field9,
                                                                                                                                                                                                                                                                                                                                          Field<T10> field10,
                                                                                                                                                                                                                                                                                                                                          Field<T11> field11,
                                                                                                                                                                                                                                                                                                                                          Field<T12> field12,
                                                                                                                                                                                                                                                                                                                                          Field<T13> field13,
                                                                                                                                                                                                                                                                                                                                          Field<T14> field14,
                                                                                                                                                                                                                                                                                                                                          Field<T15> field15,
                                                                                                                                                                                                                                                                                                                                          Field<T16> field16)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17> ResultQuery<Record17<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                                                                                                                              Field<T2> field2,
                                                                                                                                                                                                                                                                                                                                                              Field<T3> field3,
                                                                                                                                                                                                                                                                                                                                                              Field<T4> field4,
                                                                                                                                                                                                                                                                                                                                                              Field<T5> field5,
                                                                                                                                                                                                                                                                                                                                                              Field<T6> field6,
                                                                                                                                                                                                                                                                                                                                                              Field<T7> field7,
                                                                                                                                                                                                                                                                                                                                                              Field<T8> field8,
                                                                                                                                                                                                                                                                                                                                                              Field<T9> field9,
                                                                                                                                                                                                                                                                                                                                                              Field<T10> field10,
                                                                                                                                                                                                                                                                                                                                                              Field<T11> field11,
                                                                                                                                                                                                                                                                                                                                                              Field<T12> field12,
                                                                                                                                                                                                                                                                                                                                                              Field<T13> field13,
                                                                                                                                                                                                                                                                                                                                                              Field<T14> field14,
                                                                                                                                                                                                                                                                                                                                                              Field<T15> field15,
                                                                                                                                                                                                                                                                                                                                                              Field<T16> field16,
                                                                                                                                                                                                                                                                                                                                                              Field<T17> field17)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18> ResultQuery<Record18<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T2> field2,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T3> field3,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T4> field4,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T5> field5,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T6> field6,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T7> field7,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T8> field8,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T9> field9,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T10> field10,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T11> field11,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T12> field12,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T13> field13,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T14> field14,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T15> field15,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T16> field16,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T17> field17,
                                                                                                                                                                                                                                                                                                                                                                                  Field<T18> field18)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19> ResultQuery<Record19<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T2> field2,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T3> field3,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T4> field4,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T5> field5,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T6> field6,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T7> field7,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T8> field8,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T9> field9,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T10> field10,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T11> field11,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T12> field12,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T13> field13,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T14> field14,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T15> field15,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T16> field16,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T17> field17,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T18> field18,
                                                                                                                                                                                                                                                                                                                                                                                                      Field<T19> field19)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20> ResultQuery<Record20<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T2> field2,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T3> field3,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T4> field4,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T5> field5,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T6> field6,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T7> field7,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T8> field8,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T9> field9,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T10> field10,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T11> field11,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T12> field12,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T13> field13,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T14> field14,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T15> field15,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T16> field16,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T17> field17,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T18> field18,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T19> field19,
                                                                                                                                                                                                                                                                                                                                                                                                                          Field<T20> field20)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21> ResultQuery<Record21<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T2> field2,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T3> field3,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T4> field4,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T5> field5,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T6> field6,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T7> field7,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T8> field8,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T9> field9,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T10> field10,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T11> field11,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T12> field12,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T13> field13,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T14> field14,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T15> field15,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T16> field16,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T17> field17,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T18> field18,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T19> field19,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T20> field20,
                                                                                                                                                                                                                                                                                                                                                                                                                                              Field<T21> field21)
        Coerce the result record type of this query to that of a set of fields.
      • coerce

        <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21,​T22> ResultQuery<Record22<T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​T10,​T11,​T12,​T13,​T14,​T15,​T16,​T17,​T18,​T19,​T20,​T21,​T22>> coerce​(Field<T1> field1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T2> field2,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T3> field3,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T4> field4,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T5> field5,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T6> field6,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T7> field7,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T8> field8,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T9> field9,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T10> field10,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T11> field11,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T12> field12,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T13> field13,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T14> field14,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T15> field15,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T16> field16,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T17> field17,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T18> field18,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T19> field19,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T20> field20,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T21> field21,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Field<T22> field22)
        Coerce the result record type of this query to that of a set of fields.