Package com.mysql.cj.xdevapi
Class FindStatementImpl
java.lang.Object
com.mysql.cj.xdevapi.PreparableStatement<RES_T>
com.mysql.cj.xdevapi.FilterableStatement<FindStatement,DocResult>
com.mysql.cj.xdevapi.FindStatementImpl
- All Implemented Interfaces:
FindStatement
,Statement<FindStatement,DocResult>
public class FindStatementImpl extends FilterableStatement<FindStatement,DocResult> implements FindStatement
FindStatement
implementation.-
Nested Class Summary
Nested classes/interfaces inherited from class com.mysql.cj.xdevapi.PreparableStatement
PreparableStatement.PreparableStatementFinalizer, PreparableStatement.PreparedState
Nested classes/interfaces inherited from interface com.mysql.cj.xdevapi.Statement
Statement.LockContention
-
Field Summary
Fields inherited from class com.mysql.cj.xdevapi.PreparableStatement
mysqlxSession, preparedState, preparedStatementId
-
Method Summary
Modifier and Type Method Description java.util.concurrent.CompletableFuture<DocResult>
executeAsync()
Execute the statement asynchronously.protected DocResult
executePreparedStatement()
Executes a previously server-prepared statement.protected DocResult
executeStatement()
Executes the statement directly (non-prepared).FindStatement
fields(Expression docProjection)
Add/replace the field projection defining the result.FindStatement
fields(java.lang.String... projection)
Add/replace the field projections defining the result.protected XMessage
getPrepareStatementXMessage()
Returns theXMessage
needed to prepare this statement.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
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
where(java.lang.String searchCondition)
Deprecated.Deprecated in Connector/J 8.0.17.Methods inherited from class com.mysql.cj.xdevapi.FilterableStatement
bind, clearBindings, isRelational, limit, offset, orderBy, sort
Methods inherited from class com.mysql.cj.xdevapi.PreparableStatement
deallocatePrepared, execute, getMessageBuilder, resetPrepareState, setReprepareState
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
executeStatement
Description copied from class:PreparableStatement
Executes the statement directly (non-prepared). Implementation is dependent on the statement type.- Specified by:
executeStatement
in classPreparableStatement<DocResult>
- Returns:
- the object returned from the lower level statement execution
-
getPrepareStatementXMessage
Description copied from class:PreparableStatement
Returns theXMessage
needed to prepare this statement. Implementation is dependent on the statement type.- Specified by:
getPrepareStatementXMessage
in classPreparableStatement<DocResult>
- Returns:
- the
XMessage
that prepares this statement
-
executePreparedStatement
Description copied from class:PreparableStatement
Executes a previously server-prepared statement. Implementation is dependent on the statement type.- Specified by:
executePreparedStatement
in classPreparableStatement<DocResult>
- Returns:
- the object returned from the lower level statement execution
-
executeAsync
Description copied from interface:Statement
Execute the statement asynchronously.- Specified by:
executeAsync
in interfaceStatement<FindStatement,DocResult>
- Returns:
CompletableFuture
for result
-
fields
Description copied from interface:FindStatement
Add/replace the field projections defining the result.- Specified by:
fields
in interfaceFindStatement
- Parameters:
projection
- projection expression- Returns:
FindStatement
-
fields
Description copied from interface:FindStatement
Add/replace the field projection defining the result.- Specified by:
fields
in interfaceFindStatement
- Parameters:
docProjection
- projection expression- Returns:
FindStatement
-
groupBy
Description copied from interface:FindStatement
Add/replace the aggregation fields for this query.- Specified by:
groupBy
in interfaceFindStatement
- Parameters:
groupBy
- groupBy expression- Returns:
FindStatement
-
having
Description copied from interface:FindStatement
Add/replace the aggregate criteria for this query.- Specified by:
having
in interfaceFindStatement
- Parameters:
having
- having expression- Returns:
FindStatement
-
lockShared
Description copied from interface:FindStatement
Locks matching rows against updates.- Specified by:
lockShared
in interfaceFindStatement
- Returns:
FindStatement
-
lockShared
Description copied from interface:FindStatement
Locks matching rows against updates using the provided lock contention option.- Specified by:
lockShared
in interfaceFindStatement
- Parameters:
lockContention
- TheStatement.LockContention
value to set.- Returns:
FindStatement
-
lockExclusive
Description copied from interface:FindStatement
Locks matching rows exclusively so no other transactions can read or write to them.- Specified by:
lockExclusive
in interfaceFindStatement
- Returns:
FindStatement
-
lockExclusive
Description copied from interface:FindStatement
Locks matching rows exclusively so no other transactions can read or write to them, using the provided lock contention option.- Specified by:
lockExclusive
in interfaceFindStatement
- Parameters:
lockContention
- TheStatement.LockContention
value to set.- Returns:
FindStatement
-
where
Deprecated.Deprecated in Connector/J 8.0.17. Please use filter criteria in the operation starting method.Description copied from class:FilterableStatement
Add search condition to this statement.table.delete().where("age == 13").execute();
- Overrides:
where
in classFilterableStatement<FindStatement,DocResult>
- Parameters:
searchCondition
- expression- Returns:
- this statement
-