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 FindStatementfields(Expression docProjection)Add/replace the field projection defining the result.FindStatementfields(java.lang.String... projections)Add/replace the field projections defining the result.FindStatementgroupBy(java.lang.String... groupBy)Add/replace the aggregation fields for this query.FindStatementhaving(java.lang.String having)Add/replace the aggregate criteria for this query.FindStatementlimit(long numberOfRows)Add/replace the document limit for this query.FindStatementlockExclusive()Locks matching rows exclusively so no other transactions can read or write to them.FindStatementlockExclusive(Statement.LockContention lockContention)Locks matching rows exclusively so no other transactions can read or write to them, using the provided lock contention option.FindStatementlockShared()Locks matching rows against updates.FindStatementlockShared(Statement.LockContention lockContention)Locks matching rows against updates using the provided lock contention option.FindStatementoffset(long limitOffset)Add/replace the document offset for this query.FindStatementorderBy(java.lang.String... sortFields)Add/replace the order specification for this query.default FindStatementskip(long limitOffset)Deprecated.Deprecated in c/J 8.0.12, please useoffset(long)instead.FindStatementsort(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.LockContentionvalue 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.LockContentionvalue to set.- Returns:
FindStatement
-