Package com.mysql.cj.xdevapi
Interface FindStatement
- All Superinterfaces:
Statement<FindStatement,DocResult>
- All Known Implementing Classes:
FindStatementImpl
public interface FindStatement extends Statement<FindStatement,DocResult>
A statement to find the set of documents according to the given specification.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mysql.cj.xdevapi.Statement
Statement.LockContention
-
Method Summary
Modifier and Type Method Description FindStatement
fields(Expression docProjection)
Add/replace the field projection defining the result.FindStatement
fields(java.lang.String... projections)
Add/replace the field projections defining the result.FindStatement
groupBy(java.lang.String... groupBy)
Add/replace the aggregation fields for this query.FindStatement
having(java.lang.String having)
Add/replace the aggregate criteria for this query.FindStatement
limit(long numberOfRows)
Add/replace the document limit for this query.FindStatement
lockExclusive()
Locks matching rows exclusively so no other transactions can read or write to them.FindStatement
lockExclusive(Statement.LockContention lockContention)
Locks matching rows exclusively so no other transactions can read or write to them, using the provided lock contention option.FindStatement
lockShared()
Locks matching rows against updates.FindStatement
lockShared(Statement.LockContention lockContention)
Locks matching rows against updates using the provided lock contention option.FindStatement
offset(long limitOffset)
Add/replace the document offset for this query.FindStatement
orderBy(java.lang.String... sortFields)
Add/replace the order specification for this query.default FindStatement
skip(long limitOffset)
Deprecated.Deprecated in c/J 8.0.12, please useoffset(long)
instead.FindStatement
sort(java.lang.String... sortFields)
Add/replace the order specification for this query.Methods inherited from interface com.mysql.cj.xdevapi.Statement
bind, bind, bind, bind, clearBindings, execute, executeAsync
-
Method Details
-
fields
Add/replace the field projections defining the result.- Parameters:
projections
- projection expression- Returns:
FindStatement
-
fields
Add/replace the field projection defining the result.- Parameters:
docProjection
- projection expression- Returns:
FindStatement
-
groupBy
Add/replace the aggregation fields for this query.- Parameters:
groupBy
- groupBy expression- Returns:
FindStatement
-
having
Add/replace the aggregate criteria for this query.- Parameters:
having
- having expression- Returns:
FindStatement
-
orderBy
Add/replace the order specification for this query.- Parameters:
sortFields
- sort expression- Returns:
FindStatement
-
sort
Add/replace the order specification for this query.Synonym for
orderBy(String...)
- Parameters:
sortFields
- sort expression- Returns:
FindStatement
-
skip
Deprecated.Deprecated in c/J 8.0.12, please useoffset(long)
instead.Add/replace the document offset for this query.- Parameters:
limitOffset
- number of documents to skip- Returns:
FindStatement
-
offset
Add/replace the document offset for this query.- Parameters:
limitOffset
- number of documents to skip- Returns:
FindStatement
-
limit
Add/replace the document limit for this query.- Parameters:
numberOfRows
- limit- Returns:
FindStatement
-
lockShared
FindStatement lockShared()Locks matching rows against updates.- Returns:
FindStatement
-
lockShared
Locks matching rows against updates using the provided lock contention option.- Parameters:
lockContention
- TheStatement.LockContention
value to set.- Returns:
FindStatement
-
lockExclusive
FindStatement lockExclusive()Locks matching rows exclusively so no other transactions can read or write to them.- Returns:
FindStatement
-
lockExclusive
Locks matching rows exclusively so no other transactions can read or write to them, using the provided lock contention option.- Parameters:
lockContention
- TheStatement.LockContention
value to set.- Returns:
FindStatement
-