R
- The record type being returned by this querypublic interface Select<R extends Record> extends ResultQuery<R>, TableLike<R>, FieldLike
Modifier and Type | Method and Description |
---|---|
Select<R> |
except(Select<? extends R> select)
Apply the
EXCEPT (or MINUS ) set operation. |
Select<R> |
exceptAll(Select<? extends R> select)
Apply the
EXCEPT ALL set operation. |
int |
fetchCount()
Deprecated.
- 3.5.0 - [#3356] - This method is being removed as it is
confusingly different from all the other types of
ResultQuery.fetch() methods, in that it modifies the original
Select statement by wrapping it. In particular, this
method can be easily confused with ResultQuery.fetch(Field) , or
more concretely fetch(count()) , which has an
entirely different semantics. Use
DSLContext.fetchCount(Select) instead. |
java.util.List<Field<?>> |
getSelect()
All fields selected in this query
|
Select<R> |
intersect(Select<? extends R> select)
Apply the
INTERSECT set operation. |
Select<R> |
intersectAll(Select<? extends R> select)
Apply the
INTERSECT ALL set operation. |
Select<R> |
union(Select<? extends R> select)
Apply the
UNION set operation. |
Select<R> |
unionAll(Select<? extends R> select)
Apply the
UNION ALL set operation. |
bind, bind, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetch, fetchAny, fetchAny, fetchAny, fetchAny, fetchAny, fetchAny, fetchAny, fetchAny, fetchAny, fetchAny, fetchAny, fetchAny, fetchAny, fetchAny, fetchAnyArray, fetchAnyInto, fetchAnyInto, fetchAnyMap, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArray, fetchArrays, fetchAsync, fetchAsync, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchGroups, fetchInto, fetchInto, fetchInto, fetchLater, fetchLater, fetchLazy, fetchLazy, fetchMany, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMap, fetchMaps, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOne, fetchOneArray, fetchOneInto, fetchOneInto, fetchOneMap, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptional, fetchOptionalArray, fetchOptionalInto, fetchOptionalInto, fetchOptionalMap, fetchResultSet, fetchSet, fetchSet, fetchSet, fetchSet, fetchSet, fetchSet, fetchSet, fetchSet, fetchSet, fetchSet, fetchSet, fetchSet, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingle, fetchSingleArray, fetchSingleInto, fetchSingleInto, fetchSingleMap, fetchSize, fetchStream, fetchStreamInto, fetchStreamInto, forEach, getRecordType, getResult, intern, intern, intern, intern, iterator, keepStatement, maxRows, queryTimeout, resultSetConcurrency, resultSetHoldability, resultSetType, spliterator, stream
cancel, close, execute, executeAsync, executeAsync, getBindValues, getParam, getParams, getSQL, getSQL, getSQL, isExecutable
attach, configuration, detach
@Support(value={ASE,CUBRID,DB2,DERBY,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,SQLITE,SQLSERVER,SYBASE,VERTICA}) Select<R> except(Select<? extends R> select)
EXCEPT
(or MINUS
) set operation.@Support(value={CUBRID,DB2,DERBY,HSQLDB,POSTGRES}) Select<R> exceptAll(Select<? extends R> select)
EXCEPT ALL
set operation.@Support(value={ASE,CUBRID,DB2,DERBY,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,SQLITE,SQLSERVER,SYBASE,VERTICA}) Select<R> intersect(Select<? extends R> select)
INTERSECT
set operation.@Support(value={CUBRID,DB2,DERBY,HSQLDB,POSTGRES}) Select<R> intersectAll(Select<? extends R> select)
INTERSECT ALL
set operation.java.util.List<Field<?>> getSelect()
@Deprecated int fetchCount() throws DataAccessException
ResultQuery.fetch()
methods, in that it modifies the original
Select
statement by wrapping it. In particular, this
method can be easily confused with ResultQuery.fetch(Field)
, or
more concretely fetch(count())
, which has an
entirely different semantics. Use
DSLContext.fetchCount(Select)
instead.COUNT(*)
value.
This wraps a pre-existing SELECT
query in another one to
calculate the COUNT(*)
value, without modifying the original
SELECT
. An example:
This is particularly useful for those databases that do not
support the
-- Original query:
SELECT id, title FROM book WHERE title LIKE '%a%'
-- Wrapped query:
SELECT count(*) FROM (
SELECT id, title FROM book WHERE title LIKE '%a%'
)
COUNT(*) OVER()
window function to calculate
total results in paged queries.
COUNT(*)
resultDataAccessException
- if something went wrong executing the queryCopyright © 2018. All Rights Reserved.