T
- result typepublic class MySQLQuery<T> extends AbstractSQLQuery<T,MySQLQuery<T>>
MySQLQuery
provides MySQL related extensions to SQLQuerySQLQuery
,
Serialized Formlisteners, PARENT_CONTEXT, useLiterals
configuration, firstUnionSubQuery, union, unionAll
MDC_PARAMETERS, MDC_QUERY, queryMixin
Constructor and Description |
---|
MySQLQuery(Connection conn) |
MySQLQuery(Connection conn,
Configuration configuration) |
MySQLQuery(Connection conn,
Configuration configuration,
QueryMetadata metadata) |
MySQLQuery(Connection conn,
SQLTemplates templates) |
MySQLQuery(javax.inject.Provider<Connection> connProvider,
Configuration configuration) |
MySQLQuery(javax.inject.Provider<Connection> connProvider,
Configuration configuration,
QueryMetadata metadata) |
Modifier and Type | Method and Description |
---|---|
MySQLQuery<T> |
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.
|
MySQLQuery<T> |
bufferResult()
SQL_BUFFER_RESULT forces the result to be put into a temporary table.
|
MySQLQuery<T> |
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.
|
MySQLQuery<T> |
calcFoundRows()
SQL_CALC_FOUND_ROWS tells MySQL to calculate how many rows there would be in the result set,
disregarding any LIMIT clause.
|
MySQLQuery<T> |
clone(Connection conn) |
MySQLQuery<T> |
forceIndex(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.
|
MySQLQuery<T> |
highPriority()
HIGH_PRIORITY gives the SELECT higher priority than a statement that updates a table.
|
MySQLQuery<T> |
ignoreIndex(String... indexes)
The alternative syntax IGNORE INDEX (index_list) can be used to tell MySQL to not use some
particular index or indexes.
|
MySQLQuery<T> |
into(String var)
SELECT ...
|
MySQLQuery<T> |
intoDumpfile(File file)
SELECT ...
|
MySQLQuery<T> |
intoOutfile(File file)
SELECT ...
|
MySQLQuery<T> |
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.
|
MySQLQuery<T> |
noCache()
With SQL_NO_CACHE, the server does not use the query cache.
|
MySQLQuery<Tuple> |
select(Expression<?>... exprs)
Change the projection of this query
|
<U> MySQLQuery<U> |
select(Expression<U> expr)
Change the projection of this query
|
MySQLQuery<T> |
smallResult()
For SQL_SMALL_RESULT, MySQL uses fast temporary tables to store the resulting table instead
of using sorting.
|
MySQLQuery<T> |
straightJoin()
STRAIGHT_JOIN forces the optimizer to join the tables in the order in which they are listed
in the FROM clause.
|
MySQLQuery<T> |
useIndex(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.
|
MySQLQuery<T> |
withRollup()
The GROUP BY clause permits a WITH ROLLUP modifier that causes extra rows to be added to the
summary output.
|
addListener, as, as, cleanupMDC, 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, 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
transform
fetchFirst
public MySQLQuery(Connection conn)
public MySQLQuery(Connection conn, SQLTemplates templates)
public MySQLQuery(Connection conn, Configuration configuration)
public MySQLQuery(Connection conn, Configuration configuration, QueryMetadata metadata)
public MySQLQuery(javax.inject.Provider<Connection> connProvider, Configuration configuration, QueryMetadata metadata)
public MySQLQuery(javax.inject.Provider<Connection> connProvider, Configuration configuration)
public MySQLQuery<T> bigResult()
public MySQLQuery<T> bufferResult()
public MySQLQuery<T> cache()
public MySQLQuery<T> calcFoundRows()
public MySQLQuery<T> highPriority()
public MySQLQuery<T> into(String var)
var
- variable namepublic MySQLQuery<T> intoDumpfile(File file)
file
- file to write topublic MySQLQuery<T> intoOutfile(File file)
file
- file to write topublic MySQLQuery<T> lockInShareMode()
public MySQLQuery<T> noCache()
public MySQLQuery<T> smallResult()
public MySQLQuery<T> straightJoin()
public MySQLQuery<T> forceIndex(String... indexes)
indexes
- index namespublic MySQLQuery<T> ignoreIndex(String... indexes)
indexes
- index namespublic MySQLQuery<T> useIndex(String... indexes)
indexes
- index namespublic MySQLQuery<T> withRollup()
public MySQLQuery<T> clone(Connection conn)
clone
in class AbstractSQLQuery<T,MySQLQuery<T>>
public <U> MySQLQuery<U> select(Expression<U> expr)
FetchableQuery
expr
- new projectionpublic MySQLQuery<Tuple> select(Expression<?>... exprs)
FetchableQuery
exprs
- new projectionCopyright © 2007–2016 Querydsl. All rights reserved.