jOOQ distinguishes between ordinary Query types, such as
Insert, Update, Delete, and any DDLQuery,
which are meant to produce side effects in a database, and the
ResultQuery, which is meant to produce a Result through
various means.
The most common way to create a result is by calling fetch(), or by
using the query's iterator() method in a foreach loop:
Result<TRecord> result = ctx.select(T.A, T.B).from(T).fetch();
for (TRecord record : ctx.select(T.A, T.B).from(T)) {
// ...
}
Most approaches to fetching results in ResultQuery (including the
above), fetch the entire JDBC ResultSet eagerly into memory, which
allows for closing the underlying JDBC resources as quickly as possible. Such
operations are not resourceful, i.e. users do not need to worry about closing
any resources. None of the many ways of fetching data will affect the SQL
query projection (SELECT clause). Hence, users must make sure
not to fetch any unnecessary columns, themselves.
There are, however, some ways of fetching results lazily, and thus in a resourceful way. These include:
ResultQuery#fetchLazy() and related methods, which produce a
Cursor for imperative style consumption of resulting records.ResultQuery#fetchStream() and related methods, which produce a
Java Stream for functional style consumption of resulting
records.
In both cases, it is recommended to explicitly close the underlying resources
(i.e. JDBC ResultSet) using try-with-resources:
try (Cursor<TRecord> cursor = ctx.select(T.A, T.B).from(T).fetchLazy()) {
for (;;) {
TRecord record = cursor.fetchNext();
if (record == null)
break;
// ...
}
}
try (Stream<TRecord> stream = ctx.select(T.A, T.B).from(T).fetchStream()) {
stream.forEach(record -> {
// ...
});
}
While most instances of ResultQuery implement Select, there
also exist other types of ResultQuery constructed e.g. from plain SQL
APIs, such as DSLContext#resultQuery(String).
| Modifier and Type | Method and Description |
|---|---|
| public @NotNull ResultQuery | bind(String
The named parameter name. If this is a number, then this is
the same as calling param, Object bind(int, Object)The new bind value. value)Redeclares org. |
| public @NotNull ResultQuery | bind(int
The parameter index, starting with 1 index, Object The new bind value. value)Redeclares org. |
| public <X extends Record> @NotNull ResultQuery | |
| public @NotNull ResultQuery | |
| public @NotNull ResultQuery | coerce(Collection<? extends Field<?>> fields)
Coerce the result record type of this query to that of a set of fields. |
| public <T1> @NotNull ResultQuery | |
| public <T1, T2> @NotNull ResultQuery | |
| public <T1, T2, T3> @NotNull ResultQuery | |
| public <T1, T2, T3, T4> @NotNull ResultQuery | |
| public <T1, T2, T3, T4, T5> @NotNull ResultQuery | |
| public <T1, T2, T3, T4, T5, T6> @NotNull ResultQuery | |
| public <T1, T2, T3, T4, T5, T6, T7> @NotNull ResultQuery | |
| public <T1, T2, T3, T4, T5, T6, T7, T8> @NotNull ResultQuery | |
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9> @NotNull ResultQuery | |
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> @NotNull ResultQuery | 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)
Deprecated
as a consequence of
Coerce the result record type of this query to that of a set of fields.
Field being deprecated.
|
| public <X, A> X | |
| public @NotNull Result | Returns: The result. This will never benull.Execute the query and return the generated result. |
| public <T> @NotNull List | Returns: The result. This will never benull.
Deprecated
as a consequence of
Execute the query and return all values for a field from the generated
result, using Field being deprecated.
field(Field) for lookup.
|
| public <U> @NotNull List | Returns: The result. This will never benull.
Deprecated
as a consequence of
Execute the query and return all values for a field from the generated
result, using Field being deprecated.
field(Field) for lookup.
|
| public <T, U> @NotNull List | Returns: The result. This will never benull.
Deprecated
as a consequence of
Execute the query and return all values for a field from the generated
result, using Field being deprecated.
field(Field) for lookup.
|
| public @NotNull List | Returns: The result. This will never benull.Execute the query and return all values for a field index from the generated result. |
| public <U> @NotNull List | |
| public <U> @NotNull List | |
| public @NotNull List | Returns: The result. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull List | Returns: The result. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull List | Returns: The result. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public @NotNull List | Returns: The result. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull List | Returns: The result. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull List | Returns: The result. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <E> @NotNull List | Returns: The result. This will never benull.The mapper callback mapper)Fetch results into a custom mapper callback. |
| public <T> T | Returns: The resulting value ornull if the query returned no
records.
Deprecated
as a consequence of
Execute the query and return at most one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public <U> U | Returns: The resulting value ornull if the query returned no
records.
Deprecated
as a consequence of
Execute the query and return at most one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public <T, U> U | Returns: The resulting value ornull if the query returned no
records.
Deprecated
as a consequence of
Execute the query and return at most one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public @Nullable Object | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field index from the generated result. |
| public <U> U | |
| public <U> U | |
| public @Nullable Object | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public @Nullable Object | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public R | Returns: The first resulting record ornull if the query
returns no records.Execute the query and return at most one resulting record. |
| public <E> E | Returns: The first resulting record ornull if the query
returns no records.Execute the query and return at most one resulting record. |
| public @Nullable @Nullable Object[] | Returns: The resulting record ornull if the query returns no
records.Execute the query and return at most one resulting record as an array You can access data like this
|
| public < The generic entity type. E> E | Returns: The resulting record ornull if the query returns no
records.The entity type. type)Map resulting records onto a custom type. |
| public < The generic table record type. Z extends Record> Z | Returns: The resulting record ornull if the query returns no
records.The table type. table)Map resulting records onto a custom record. |
| public @Nullable Map | Returns: The resulting record ornull if the query returns no
records.Execute the query and return at most one resulting record as a name/value map. |
| public @NotNull R[] | Returns: The result. This will never benull.Execute the query and return the generated result as an array of records. |
| public @NotNull @Nullable Object[] | Returns: The resulting values. This may be an array type more concrete thanObject[], depending on whether jOOQ has any
knowledge about fieldIndex's actual type. This will
never be null.Execute the query and return all values for a field index from the generated result. |
| public <U> @NotNull U[] | Returns: The resulting values. This will never benull.Execute the query and return all values for a field index from the generated result. |
| public <U> @NotNull U[] | Returns: The resulting values. This will never benull.Execute the query and return all values for a field index from the generated result. |
| public @NotNull @Nullable Object[] | Returns: The resulting values. This may be an array type more concrete thanObject[], depending on whether jOOQ has any
knowledge about fieldName's actual type. This will
never be null.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull U[] | Returns: The resulting values. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull U[] | Returns: The resulting values. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public @NotNull @Nullable Object[] | Returns: The resulting values. This may be an array type more concrete thanObject[], depending on whether jOOQ has any
knowledge about fieldName's actual type. This will
never be null.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull U[] | Returns: The resulting values. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull U[] | Returns: The resulting values. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <T> @NotNull T[] | Returns: The result. This will never benull.
Deprecated
as a consequence of
Execute the query and return all values for a field from the generated
result, using Field being deprecated.
field(Field) for lookup.
|
| public <U> @NotNull U[] | Returns: The result. This will never benull.
Deprecated
as a consequence of
Execute the query and return all values for a field from the generated
result, using Field being deprecated.
field(Field) for lookup.
|
| public <T, U> @NotNull U[] | Returns: The result. This will never benull.
Deprecated
as a consequence of
Execute the query and return all values for a field from the generated
result, using Field being deprecated.
field(Field) for lookup.
|
| public @NotNull @NotNull @Nullable Object[][] | Returns: The result. This will never benull.Execute the query and return the generated result as an Object matrix. |
| public @NotNull CompletionStage | Returns: The completion stage. The completed result will never benull.Fetch results in a new |
| public @NotNull CompletionStage | Returns: The completion stage. The completed result will never benull.Fetch results in a new |
| public < The key's generic field type K> @NotNull Map | Returns: A Map containing the results. This will never benull.The key field. key)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with one of the result's
columns as key and a list of corresponding records as value, using
field(Field) for lookup.
|
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The key field index. keyFieldIndex)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The key field name. keyFieldName)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The key field name. keyFieldName)Execute the query and return a |
| public < The key's generic field type K, The value's generic field type V> @NotNull Map | Returns: A Map containing the results. This will never benull.The key field. key, Field<V> The value field value)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with one of the result's
columns as key and another one of the result's columns as value, using
field(Field) for lookup.
|
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The key field index. keyFieldIndex, int The value field index. valueFieldIndex)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The key field name. keyFieldName, String The value field name. valueFieldName)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The key field name. keyFieldName, Name The value field name. valueFieldName)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys used for result grouping. If this is
keys)null or an empty array, the resulting map will
contain at most one entry.
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with the result grouped by the
given keys, using field(Field) for lookup.
|
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The keys used for result grouping. If this is
keyFieldIndexes)null or an empty array, the resulting map will
contain at most one entry.Execute the query and return a |
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The keys used for result grouping. If this is
keyFieldNames)null or an empty array, the resulting map will
contain at most one entry.Execute the query and return a |
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The keys used for result grouping. If this is
keyFieldNames)null or an empty array, the resulting map will
contain at most one entry.Execute the query and return a |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys used for result grouping. If this is
keys, Field<?>[] null or an empty array, the resulting map will
contain at most one entry.The values. values)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with the result grouped by the
given keys, using field(Field) for lookup.
|
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The keys used for result grouping. If this is
keyFieldIndexes, int[] null or an empty array, the resulting map will
contain at most one entry.The values. valueFieldIndexes)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The keys used for result grouping. If this is
keyFieldNames, String[] null or an empty array, the resulting map will
contain at most one entry.The values. valueFieldNames)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing the results. This will never benull.The keys used for result grouping. If this is
keyFieldNames, Name[] null or an empty array, the resulting map will
contain at most one entry.The values returned per group. valueFieldNames)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. If this is keys, Class<? extends E> null or an empty array, the
resulting map will contain at most one entry.The entity type. type)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with results grouped by the
given keys and mapped into the given entity type, using
field(Field) for lookup.
|
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The keys. If this is keyFieldIndexes, Class<? extends E> null or an empty
array, the resulting map will contain at most one entry.The entity type. type)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The keys. If this is keyFieldNames, Class<? extends E> null or an empty
array, the resulting map will contain at most one entry.The entity type. type)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The keys. If this is keyFieldNames, Class<? extends E> null or an empty
array, the resulting map will contain at most one entry.The entity type. type)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. If this is keys, RecordMapper<? super R, E> null or an empty array, the
resulting map will contain at most one entry.The mapper callback. mapper)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with results grouped by the
given keys and mapped by the given mapper, using field(Field)
for lookup.
|
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The keys. If this is keyFieldIndexes, RecordMapper<? super R, E> null or an empty
array, the resulting map will contain at most one entry.The mapper callback. mapper)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The keys. If this is keyFieldNames, RecordMapper<? super R, E> null or an empty
array, the resulting map will contain at most one entry.The mapper callback. mapper)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The keys. If this is keyFieldNames, RecordMapper<? super R, E> null or an empty
array, the resulting map will contain at most one entry.The mapper callback. mapper)Execute the query and return a |
| public <K> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key type. If this is keyType)null, the resulting
map will contain at most one entry.Execute the query and return a |
| public <K, V> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key type. If this is keyType, Class<? extends V> null, the resulting
map will contain at most one entry.The value type. valueType)Execute the query and return a |
| public <K, V> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key type. If this is keyType, RecordMapper<? super R, V> null, the resulting
map will contain at most one entry.The value mapper. valueMapper)Execute the query and return a |
| public <K> @NotNull Map | Returns: A Map containing the results. This will never benull.The key mapper. keyMapper)Execute the query and return a |
| public <K, V> @NotNull Map | Returns: A Map containing the results. This will never benull.The key mapper. keyMapper, Class<V> The value type. valueType)Execute the query and return a |
| public <K, V> @NotNull Map | Returns: A Map containing the results. This will never benull.The key mapper. keyMapper, RecordMapper<? super R, V> The value mapper. valueMapper)Execute the query and return a |
| public <S extends Record> @NotNull Map | Returns: A Map containing the results. This will never benull.The key table. May not be table)null.Execute the query and return a |
| public <S extends Record, T extends Record> @NotNull Map | Returns: A Map containing the results. This will never benull.The key table. May not be keyTable, Table<T> null.The value table. May not be valueTable)null.Execute the query and return a |
| public <E, S extends Record> @NotNull Map | Returns: A Map containing the results. This will never benull.The key table. May not be table, Class<? extends E> null.The entity type. type)Execute the query and return a |
| public <E, S extends Record> @NotNull Map | Returns: A Map containing the results. This will never benull.The key table. May not be table, RecordMapper<? super R, E> null.The mapper callback. mapper)Execute the query and return a |
| public < The key's generic field type K, The generic entity type. E> @NotNull Map | Returns: A Map containing the results. This will never benull.The key field. key, Class<? extends E> The entity type. type)
Deprecated
as a consequence of
Return a Field being deprecated.
Map with results grouped by the given key and mapped
into the given entity type, using field(Field) for lookup.
|
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The key field index. keyFieldIndex, Class<? extends E> The entity type. type)Return a |
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The key field name. keyFieldName, Class<? extends E> The entity type. type)Return a |
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The key field name. keyFieldName, Class<? extends E> The entity type. type)Return a |
| public < The key's generic field type K, The generic entity type. E> @NotNull Map | Returns: A Map containing the results. This will never benull.The key field. key, RecordMapper<? super R, E> The mapper callback. mapper)
Deprecated
as a consequence of
Return a Field being deprecated.
Map with results grouped by the given key and mapped by
the given mapper, using field(Field) for lookup.
|
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The key field index. keyFieldIndex, RecordMapper<? super R, E> The mapper callback. mapper)Return a |
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The key field name. keyFieldName, RecordMapper<? super R, E> The mapper callback. mapper)Return a |
| public <E> @NotNull Map | Returns: A Map containing the results. This will never benull.The key field name. keyFieldName, RecordMapper<? super R, E> The mapper callback. mapper)Return a |
| public < The generic entity type. E> @NotNull List | |
| public < The generic table record type. Z extends Record> @NotNull Result | |
| public <H extends RecordHandler | Returns: Convenience result, returning the parameter handler itselfThe handler callback handler)
Deprecated
for removal since 3.15. - 3.15.0 - [#11902] - Use
Fetch results into a custom handler callback.
Iterable#forEach(Consumer)
based methods, instead.
|
| public @NotNull Cursor | Returns: The resulting cursor. This will never benull.Execute the query and "lazily" return the generated result. |
| public @NotNull Results | Returns: The resulting records. This will never benull.Execute a query, possibly returning several result sets. |
| public < The key's generic field type K> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key field. Client code must assure that this field is
unique in the result set. key)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with one of the result's
columns as key and the corresponding records as value, using
field(Field) for lookup.
|
| public @NotNull Map | |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key field. Client code must assure that this
field is unique in the result set. keyFieldName)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key field. Client code must assure that this
field is unique in the result set. keyFieldName)Execute the query and return a |
| public < The key's generic field type K, The value's generic field type V> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key field. Client code must assure that this field is
unique in the result set. key, Field<V> The value field value)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with one of the result's
columns as key and another one of the result's columns as value, using
field(Field) for lookup.
|
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key field. Client code must assure that this
field is unique in the result set. keyFieldIndex, int The value field valueFieldIndex)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key field. Client code must assure that this
field is unique in the result set. keyFieldName, String The value field valueFieldName)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key field. Client code must assure that this
field is unique in the result set. keyFieldName, Name The value field valueFieldName)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are unique in the
result set. keys)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with keys as a map key and the
corresponding record as value, using field(Field) for lookup.
|
| public @NotNull Map | |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. keyFieldNames)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. keyFieldNames)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are unique in the
result set. keys, Field<?>[] The values. values)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with keys as a map key and the
corresponding record as value, using field(Field) for lookup.
|
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. keyFieldIndexes, int[] The values. valueFieldIndexes)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. keyFieldNames, String[] The values. valueFieldNames)Execute the query and return a |
| public @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. keyFieldNames, Name[] The values. valueFieldNames)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are unique in the
result set. If this is keys, Class<? extends E> null or an empty array,
the resulting map will contain at most one entry.The entity type. type)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with results grouped by the
given keys and mapped into the given entity type, using
field(Field) for lookup.
|
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. If this is keyFieldIndexes, Class<? extends E> null or an
empty array, the resulting map will contain at most one entry.The entity type. type)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. If this is keyFieldNames, Class<? extends E> null or an
empty array, the resulting map will contain at most one entry.The entity type. type)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. If this is keyFieldNames, Class<? extends E> null or an
empty array, the resulting map will contain at most one entry.The entity type. type)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are unique in the
result set. If this is keys, RecordMapper<? super R, E> null or an empty array,
the resulting map will contain at most one entry.The mapper callback. mapper)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with results grouped by the
given keys and mapped by the given mapper, using field(Field)
for lookup.
|
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. If this is keyFieldIndexes, RecordMapper<? super R, E> null or an
empty array, the resulting map will contain at most one entry.The mapper callback. mapper)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. If this is keyFieldNames, RecordMapper<? super R, E> null or an
empty array, the resulting map will contain at most one entry.The mapper callback. mapper)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The keys. Client code must assure that keys are
unique in the result set. If this is keyFieldNames, RecordMapper<? super R, E> null or an
empty array, the resulting map will contain at most one entry.The mapper callback. mapper)Execute the query and return a |
| public <K> @NotNull Map | |
| public <K, V> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key type. If this is keyType, Class<? extends V> null, the resulting
map will contain at most one entry.The value type. valueType)Execute the query and return a |
| public <K, V> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key type. If this is keyType, RecordMapper<? super R, V> null, the resulting
map will contain at most one entry.The value mapper. valueMapper)Execute the query and return a |
| public <K> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key mapper. keyMapper)Execute the query and return a |
| public <K, V> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key mapper. keyMapper, Class<V> The value type. valueType)Execute the query and return a |
| public <K, V> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key mapper. keyMapper, RecordMapper<? super R, V> The value mapper. valueMapper)Execute the query and return a |
| public <S extends Record> @NotNull Map | |
| public <S extends Record, T extends Record> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key table. Client code must assure that keys are
unique in the result set. May not be keyTable, Table<T> null.The value table. May not be valueTable)null.Execute the query and return a |
| public <E, S extends Record> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key table. Client code must assure that keys are unique
in the result set. May not be table, Class<? extends E> null.The entity type. type)Execute the query and return a |
| public <E, S extends Record> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key table. Client code must assure that keys are unique
in the result set. May not be table, RecordMapper<? super R, E> null.The mapper callback. mapper)Execute the query and return a |
| public <K, E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key. Client code must assure that key is unique in the
result set. key, Class<? extends E> The entity type. type)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with results grouped by the
given key and mapped into the given entity type, using
field(Field) for lookup.
|
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key. Client code must assure that key is unique
in the result set. keyFieldIndex, Class<? extends E> The entity type. type)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key. Client code must assure that key is unique
in the result set. keyFieldName, Class<? extends E> The entity type. type)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key. Client code must assure that key is unique
in the result set. keyFieldName, Class<? extends E> The entity type. type)Execute the query and return a |
| public <K, E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key. Client code must assure that key is unique in the
result set. key, RecordMapper<? super R, E> The mapper callback. mapper)
Deprecated
as a consequence of
Execute the query and return a Field being deprecated.
Map with results grouped by the
given key and mapped by the given mapper, using field(Field) for
lookup.
|
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key. Client code must assure that key is unique
in the result set. keyFieldIndex, RecordMapper<? super R, E> The mapper callback. mapper)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key. Client code must assure that key is unique
in the result set. keyFieldName, RecordMapper<? super R, E> The mapper callback. mapper)Execute the query and return a |
| public <E> @NotNull Map | Returns: A Map containing grouped results. This will never benull.The key. Client code must assure that key is unique
in the result set. keyFieldName, RecordMapper<? super R, E> The mapper callback. mapper)Execute the query and return a |
| public @NotNull List | Returns: The result. This will never benull.Execute the query and return the generated result as a list of name/value maps. |
| public <T> T | Returns: The resulting value ornull if the query returned no
records.
Deprecated
as a consequence of
Execute the query and return at most one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public <U> U | Returns: The resulting value ornull if the query returned no
records.
Deprecated
as a consequence of
Execute the query and return at most one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public <T, U> U | Returns: The resulting value ornull if the query returned no
records.
Deprecated
as a consequence of
Execute the query and return at most one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public @Nullable Object | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field index from the generated result. |
| public <U> U | |
| public <U> U | |
| public @Nullable Object | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public @Nullable Object | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value ornull if the query returned no
records.Execute the query and return at most one resulting value for a field name
from the generated result, using |
| public R | Returns: The resulting record ornull if the query returns no
records.Execute the query and return at most one resulting record. |
| public <E> E | Returns: The custom mapped record ornull if the query
returned no records.Execute the query and return at most one resulting value into a custom mapper callback. |
| public @Nullable @Nullable Object[] | Returns: The resulting record ornull if the query returns no
records.Execute the query and return at most one resulting record as an array You can access data like this
|
| public < The generic entity type. E> E | Returns: The resulting record ornull if the query returns no
records.The entity type. type)Map resulting records onto a custom type. |
| public < The generic table record type. Z extends Record> Z | Returns: The resulting record ornull if the query returns no
records.The table type. table)Map resulting records onto a custom record. |
| public @Nullable Map | Returns: The resulting record ornull if the query returns no
records.Execute the query and return at most one resulting record as a name/value map. |
| public <T> @NotNull Optional | Returns: The resulting value
Deprecated
as a consequence of
Execute the query and return at most one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public <U> @NotNull Optional | Returns: The resulting value
Deprecated
as a consequence of
Execute the query and return at most one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public <T, U> @NotNull Optional | Returns: The resulting value
Deprecated
as a consequence of
Execute the query and return at most one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public @NotNull Optional | Returns: The resulting valueExecute the query and return at most one resulting value for a field index from the generated result. |
| public <U> @NotNull Optional | Returns: The resulting valueExecute the query and return at most one resulting value for a field index from the generated result. |
| public <U> @NotNull Optional | Returns: The resulting valueExecute the query and return at most one resulting value for a field index from the generated result. |
| public @NotNull Optional | Returns: The resulting valueExecute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> @NotNull Optional | Returns: The resulting valueExecute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> @NotNull Optional | Returns: The resulting valueExecute the query and return at most one resulting value for a field name
from the generated result, using |
| public @NotNull Optional | Returns: The resulting valueExecute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> @NotNull Optional | Returns: The resulting valueExecute the query and return at most one resulting value for a field name
from the generated result, using |
| public <U> @NotNull Optional | Returns: The resulting valueExecute the query and return at most one resulting value for a field name
from the generated result, using |
| public @NotNull Optional | Returns: The resulting recordExecute the query and return at most one resulting record. |
| public <E> @NotNull Optional | Returns: The custom mapped recordExecute the query and return at most one resulting value into a custom mapper callback. |
| public @NotNull Optional | Returns: The resulting recordExecute the query and return at most one resulting record as an array. |
| public < The generic entity type. E> @NotNull Optional | Returns: The resulting recordThe entity type. type)Map resulting records onto a custom type. |
| public < The generic table record type. Z extends Record> @NotNull Optional | Returns: The resulting recordThe table type. table)Map resulting records onto a custom record. |
| public @NotNull Optional | Returns: The resulting recordExecute the query and return at most one resulting record as a name/value map. |
| public @NotNull ResultSet | Returns: The result. This will never benull.Execute the query and return the generated result as a JDBC
|
| public <E> @NotNull Set | Returns: The result. This will never benull.The mapper callback mapper)Fetch results into a custom mapper callback. |
| public @NotNull Set | Returns: The resulting values. This will never benull.Execute the query and return all values for a field index from the generated result. |
| public <U> @NotNull Set | |
| public <U> @NotNull Set | |
| public @NotNull Set | Returns: The resulting values. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull Set | Returns: The resulting values. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull Set | Returns: The resulting values. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public @NotNull Set | Returns: The resulting values. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull Set | Returns: The resulting values. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <U> @NotNull Set | Returns: The resulting values. This will never benull.Execute the query and return all values for a field name from the
generated result, using |
| public <T> @NotNull Set | Returns: The resulting values. This will never benull.
Deprecated
as a consequence of
Execute the query and return all values for a field from the generated
result, using Field being deprecated.
field(Field) for lookup.
|
| public <U> @NotNull Set | Returns: The resulting values. This will never benull.
Deprecated
as a consequence of
Execute the query and return all values for a field from the generated
result, using Field being deprecated.
field(Field) for lookup.
|
| public <T, U> @NotNull Set | Returns: The resulting values. This will never benull.
Deprecated
as a consequence of
Execute the query and return all values for a field from the generated
result, using Field being deprecated.
field(Field) for lookup.
|
| public <T> T | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.
Deprecated
as a consequence of
Execute the query and return exactly one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public <U> U | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.
Deprecated
as a consequence of
Execute the query and return exactly one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public <T, U> U | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.
Deprecated
as a consequence of
Execute the query and return exactly one resulting value for a field from
the generated result, using Field being deprecated.
field(Field) for lookup.
|
| public @Nullable Object | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.Execute the query and return exactly one resulting value for a field index from the generated result. |
| public <U> U | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.Execute the query and return exactly one resulting value for a field index from the generated result. |
| public <U> U | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.Execute the query and return exactly one resulting value for a field index from the generated result. |
| public @Nullable Object | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.Execute the query and return exactly one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.Execute the query and return exactly one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.Execute the query and return exactly one resulting value for a field name
from the generated result, using |
| public @Nullable Object | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.Execute the query and return exactly one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.Execute the query and return exactly one resulting value for a field name
from the generated result, using |
| public <U> U | Returns: The resulting value. Unlike otherfetchSingle() methods,
which never produce null records, this can be null
if the resulting value in the record is null.Execute the query and return exactly one resulting value for a field name
from the generated result, using |
| public R | Returns: The resulting value. This is nevernull.Execute the query and return exactly one resulting record. |
| public <E> E | Returns: The resulting value. This is nevernull.Execute the query and return exactly one resulting value into a custom mapper callback. |
| public @NotNull @Nullable Object[] | Returns: The resulting value. This is nevernull.Execute the query and return exactly one resulting record as an array You can access data like this
|
| public < The generic entity type. E> E | Returns: The resulting value.The entity type. type)Map resulting records onto a custom type. |
| public < The generic table record type. Z extends Record> Z | Returns: The resulting value. This is nevernull.The table type. table)Map resulting records onto a custom record. |
| public @NotNull Map | Returns: The resulting value. This is nevernull.Execute the query and return exactly one resulting record as a name/value map. |
| public @NotNull ResultQuery | |
| public @NotNull Stream | |
| public < The generic entity type. E> @NotNull Stream | Returns: The results.The entity type. type)Stream this query, mapping records into a custom type. |
| public < The generic table record type. Z extends Record> @NotNull Stream | Returns: The results. This will never benull.The table type. table)Stream this query, mapping records into a custom record. |
| public default void | forEach(Consumer<? super R>
The action to be performed for each element action)Overrides default java. |
| public @NotNull Class | |
| public @Nullable Result | Returns: The result ornull if no call to execute() was done
previously.Return the result generated by a previous call to execute(). |
| public @NotNull ResultQuery | |
| public @NotNull ResultQuery | Returns: The same result queryThe field indexes whose values should be interned fieldIndexes)
Deprecated
for removal since 3.10. - 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.
|
| public @NotNull ResultQuery | |
| public @NotNull ResultQuery | |
| public @NotNull Iterator | iterator()
Redeclares java. fetch() and return the generated result
as an Iterator.
|
| public @NotNull CloseableResultQuery | keepStatement(boolean
Whether to keep the underlying statement open keepStatement)Redeclares org. |
| public @NotNull ResultQuery | |
| public @NotNull ResultQuery | poolable(boolean poolable)
Redeclares org. java. created by this query
should be java..
|
| public @NotNull ResultQuery | queryTimeout(int timeout)
Redeclares org. Statement.
|
| public @NotNull ResultQuery | resultSetConcurrency(int resultSetConcurrency)
Specify the |
| public @NotNull ResultQuery | resultSetHoldability(int resultSetHoldability)
Specify the |
| public @NotNull ResultQuery | |
| public default @NotNull Spliterator | spliterator()
Overrides default java. fetch() and return the generated result
as an Spliterator.
|
| public @NotNull Stream |