T
- result typeC
- the concrete subtypepublic abstract class AbstractMySQLQuery<T,C extends AbstractMySQLQuery<T,C>> extends AbstractSQLQuery<T,C>
MySQLQuery
provides MySQL related extensions to SQLQuery.SQLQuery
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected static java.lang.String |
HIGH_PRIORITY |
protected static java.lang.String |
LOCK_IN_SHARE_MODE |
protected static java.lang.String |
SQL_BIG_RESULT |
protected static java.lang.String |
SQL_BUFFER_RESULT |
protected static java.lang.String |
SQL_CACHE |
protected static java.lang.String |
SQL_CALC_FOUND_ROWS |
protected static java.lang.String |
SQL_NO_CACHE |
protected static java.lang.String |
SQL_SMALL_RESULT |
protected static java.lang.String |
STRAIGHT_JOIN |
protected static java.lang.String |
WITH_ROLLUP |
listeners, PARENT_CONTEXT, useLiterals
configuration, firstUnionSubQuery, union, unionAll
MDC_PARAMETERS, MDC_QUERY, queryMixin
Constructor and Description |
---|
AbstractMySQLQuery(java.sql.Connection conn,
Configuration configuration,
QueryMetadata metadata) |
AbstractMySQLQuery(java.util.function.Supplier<java.sql.Connection> connProvider,
Configuration configuration,
QueryMetadata metadata) |
Modifier and Type | Method and Description |
---|---|
C |
bigResult()
For SQL_BIG_RESULT, MySQL directly uses disk-based temporary tables if needed, and prefers
sorting to using a temporary table with a key on the GROUP BY elements.
|
C |
bufferResult()
SQL_BUFFER_RESULT forces the result to be put into a temporary table.
|
C |
cache()
SQL_CACHE tells MySQL to store the result in the query cache if it is cacheable and the value
of the query_cache_type system variable is 2 or DEMAND.
|
C |
calcFoundRows()
SQL_CALC_FOUND_ROWS tells MySQL to calculate how many rows there would be in the result set,
disregarding any LIMIT clause.
|
C |
forceIndex(java.lang.String... indexes)
You can use FORCE INDEX, which acts like USE INDEX (index_list) but with the addition that a
table scan is assumed to be very expensive.
|
C |
highPriority()
HIGH_PRIORITY gives the SELECT higher priority than a statement that updates a table.
|
C |
ignoreIndex(java.lang.String... indexes)
The alternative syntax IGNORE INDEX (index_list) can be used to tell MySQL to not use some
particular index or indexes.
|
C |
into(java.lang.String var)
SELECT ...
|
C |
intoDumpfile(java.io.File file)
SELECT ...
|
C |
intoOutfile(java.io.File file)
SELECT ...
|
C |
lockInShareMode()
Using LOCK IN SHARE MODE sets a shared lock that permits other transactions to read the examined
rows but not to update or delete them.
|
C |
noCache()
With SQL_NO_CACHE, the server does not use the query cache.
|
C |
smallResult()
For SQL_SMALL_RESULT, MySQL uses fast temporary tables to store the resulting table instead
of using sorting.
|
C |
straightJoin()
STRAIGHT_JOIN forces the optimizer to join the tables in the order in which they are listed
in the FROM clause.
|
C |
useIndex(java.lang.String... indexes)
By specifying USE INDEX (index_list), you can tell MySQL to use only one of the named indexes
to find rows in the table.
|
C |
withRollup()
The GROUP BY clause permits a WITH ROLLUP modifier that causes extra rows to be added to the
summary output.
|
addListener, as, as, clone, clone, clone, createSerializer, endContext, fetch, fetchCount, fetchResults, forShare, forShare, forUpdate, getConfiguration, getResults, getResults, iterate, logQuery, onException, setParameters, setStatementOptions, setUseLiterals, startContext
accept, addFlag, addFlag, addFlag, addFlag, addJoinFlag, addJoinFlag, fetchOne, from, from, from, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, getSQL, getSQL, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, on, on, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, serialize, toString, union, union, union, unionAll, unionAll, unionAll, with, with, with, withRecursive, withRecursive, withRecursive
contains, contains, eq, eq, exists, getMetadata, getType, goe, goe, gt, gt, hashCode, in, in, isNotNull, isNull, loe, loe, lt, lt, ne, ne, notExists
equals, fetchFirst, transform, uniqueResult
distinct, groupBy, groupBy, having, having, limit, offset, orderBy, orderBy, restrict, set, where, where
finalize, getClass, notify, notifyAll, wait, wait, wait
distinct, limit, offset, orderBy, restrict, set
where
select, select, transform
fetchFirst, stream
protected static final java.lang.String WITH_ROLLUP
protected static final java.lang.String STRAIGHT_JOIN
protected static final java.lang.String SQL_SMALL_RESULT
protected static final java.lang.String SQL_NO_CACHE
protected static final java.lang.String LOCK_IN_SHARE_MODE
protected static final java.lang.String HIGH_PRIORITY
protected static final java.lang.String SQL_CALC_FOUND_ROWS
protected static final java.lang.String SQL_CACHE
protected static final java.lang.String SQL_BUFFER_RESULT
protected static final java.lang.String SQL_BIG_RESULT
public AbstractMySQLQuery(java.sql.Connection conn, Configuration configuration, QueryMetadata metadata)
public AbstractMySQLQuery(java.util.function.Supplier<java.sql.Connection> connProvider, Configuration configuration, QueryMetadata metadata)
public C bigResult()
public C bufferResult()
public C cache()
public C calcFoundRows()
public C highPriority()
public C into(java.lang.String var)
var
- variable namepublic C intoDumpfile(java.io.File file)
file
- file to write topublic C intoOutfile(java.io.File file)
file
- file to write topublic C lockInShareMode()
public C noCache()
public C smallResult()
public C straightJoin()
public C forceIndex(java.lang.String... indexes)
indexes
- index namespublic C ignoreIndex(java.lang.String... indexes)
indexes
- index namespublic C useIndex(java.lang.String... indexes)
indexes
- index namespublic C withRollup()
Copyright © 2007–2021 Querydsl. All rights reserved.