Top Description Fields Constructors Methods
com.mysql.cj.xdevapi

public Class FindStatementImpl

extends FilterableStatement<FindStatement, DocResult>
implements FindStatement
Class Inheritance
All Implemented Interfaces
com.mysql.cj.xdevapi.FindStatement, com.mysql.cj.xdevapi.Statement
Imports
java.util.concurrent.CompletableFuture, com.mysql.cj.MysqlxSession, com.mysql.cj.protocol.x.XMessage, com.mysql.cj.xdevapi.FilterParams.RowLock, .FilterParams.RowLockOptions

FindStatement implementation.

Field Summary

Inherited from com.mysql.cj.xdevapi.FilterableStatement:
filterParams

Constructor Summary

AccessConstructor and Description
pack-priv
FindStatementImpl(MysqlxSession mysqlxSession, String schema, String collection, String criteria)

Method Summary

Modifier and TypeMethod and Description
public CompletableFuture<DocResult>
executeAsync()

Implements com.mysql.cj.xdevapi.Statement.executeAsync.

Execute the statement asynchronously.

protected DocResult
executePreparedStatement()

Implements abstract com.mysql.cj.xdevapi.PreparableStatement.executePreparedStatement.

Executes a previously server-prepared statement.

protected DocResult
executeStatement()

Implements abstract com.mysql.cj.xdevapi.PreparableStatement.executeStatement.

Executes the statement directly (non-prepared).

public FindStatement
fields(String...
projection expression
projection
)

Implements com.mysql.cj.xdevapi.FindStatement.fields.

Add/replace the field projections defining the result.

public FindStatement
fields(Expression
projection expression
docProjection
)

Implements com.mysql.cj.xdevapi.FindStatement.fields.

Add/replace the field projection defining the result.

protected XMessage
getPrepareStatementXMessage()

Implements abstract com.mysql.cj.xdevapi.PreparableStatement.getPrepareStatementXMessage.

Returns the XMessage needed to prepare this statement.

public FindStatement
groupBy(String...
groupBy expression
groupBy
)

Implements com.mysql.cj.xdevapi.FindStatement.groupBy.

Add/replace the aggregation fields for this query.

public FindStatement
having(String
having expression
having
)

Implements com.mysql.cj.xdevapi.FindStatement.having.

Add/replace the aggregate criteria for this query.

public FindStatement
lockExclusive()

Implements com.mysql.cj.xdevapi.FindStatement.lockExclusive.

Locks matching rows exclusively so no other transactions can read or write to them.

public FindStatement
lockExclusive(Statement.LockContention lockContention)

Implements com.mysql.cj.xdevapi.FindStatement.lockExclusive.

Locks matching rows exclusively so no other transactions can read or write to them, using the provided lock contention option.

public FindStatement
lockShared()

Implements com.mysql.cj.xdevapi.FindStatement.lockShared.

Locks matching rows against updates.

public FindStatement
lockShared(Statement.LockContention lockContention)

Implements com.mysql.cj.xdevapi.FindStatement.lockShared.

Locks matching rows against updates using the provided lock contention option.

public FindStatement
where(String
expression
searchCondition
)

Overrides com.mysql.cj.xdevapi.FilterableStatement.where.

Deprecated Deprecated in Connector/J 8.0.17. Please use filter criteria in the operation starting method.

Add search condition to this statement.

Inherited from com.mysql.cj.xdevapi.FilterableStatement:
bindclearBindingsisRelationallimitoffsetorderBysort

Constructor Detail

FindStatementImplback to summary
pack-priv FindStatementImpl(MysqlxSession mysqlxSession, String schema, String collection, String criteria)

Method Detail

executeAsyncback to summary
public CompletableFuture<DocResult> executeAsync()

Implements com.mysql.cj.xdevapi.Statement.executeAsync.

Doc from com.mysql.cj.xdevapi.Statement.executeAsync.

Execute the statement asynchronously.

Returns:CompletableFuture<DocResult>

CompletableFuture for result

Annotations
@Override
executePreparedStatementback to summary
protected DocResult executePreparedStatement()

Implements abstract com.mysql.cj.xdevapi.PreparableStatement.executePreparedStatement.

Doc from com.mysql.cj.xdevapi.PreparableStatement.executePreparedStatement.

Executes a previously server-prepared statement. Implementation is dependent on the statement type.

Returns:DocResult

the object returned from the lower level statement execution

Annotations
@Override
executeStatementback to summary
protected DocResult executeStatement()

Implements abstract com.mysql.cj.xdevapi.PreparableStatement.executeStatement.

Doc from com.mysql.cj.xdevapi.PreparableStatement.executeStatement.

Executes the statement directly (non-prepared). Implementation is dependent on the statement type.

Returns:DocResult

the object returned from the lower level statement execution

Annotations
@Override
fieldsback to summary
public FindStatement fields(String... projection)

Implements com.mysql.cj.xdevapi.FindStatement.fields.

Doc from com.mysql.cj.xdevapi.FindStatement.fields.

Add/replace the field projections defining the result.

Parameters
projection:String[]

projection expression

Returns:FindStatement

FindStatement

Annotations
@Override
fieldsback to summary
public FindStatement fields(Expression docProjection)

Implements com.mysql.cj.xdevapi.FindStatement.fields.

Doc from com.mysql.cj.xdevapi.FindStatement.fields.

Add/replace the field projection defining the result.

Parameters
docProjection:Expression

projection expression

Returns:FindStatement

FindStatement

Annotations
@Override
getPrepareStatementXMessageback to summary
protected XMessage getPrepareStatementXMessage()

Implements abstract com.mysql.cj.xdevapi.PreparableStatement.getPrepareStatementXMessage.

Doc from com.mysql.cj.xdevapi.PreparableStatement.getPrepareStatementXMessage.

Returns the XMessage needed to prepare this statement. Implementation is dependent on the statement type.

Returns:XMessage

the XMessage that prepares this statement

Annotations
@Override
groupByback to summary
public FindStatement groupBy(String... groupBy)

Implements com.mysql.cj.xdevapi.FindStatement.groupBy.

Doc from com.mysql.cj.xdevapi.FindStatement.groupBy.

Add/replace the aggregation fields for this query.

Parameters
groupBy:String[]

groupBy expression

Returns:FindStatement

FindStatement

Annotations
@Override
havingback to summary
public FindStatement having(String having)

Implements com.mysql.cj.xdevapi.FindStatement.having.

Doc from com.mysql.cj.xdevapi.FindStatement.having.

Add/replace the aggregate criteria for this query.

Parameters
having:String

having expression

Returns:FindStatement

FindStatement

Annotations
@Override
lockExclusiveback to summary
public FindStatement lockExclusive()

Implements com.mysql.cj.xdevapi.FindStatement.lockExclusive.

Doc from com.mysql.cj.xdevapi.FindStatement.lockExclusive.

Locks matching rows exclusively so no other transactions can read or write to them.

Returns:FindStatement

FindStatement

Annotations
@Override
lockExclusiveback to summary
public FindStatement lockExclusive(Statement.LockContention lockContention)

Implements com.mysql.cj.xdevapi.FindStatement.lockExclusive.

Doc from com.mysql.cj.xdevapi.FindStatement.lockExclusive.

Locks matching rows exclusively so no other transactions can read or write to them, using the provided lock contention option.

Parameters
lockContention:Statement.LockContention

The com.mysql.cj.xdevapi.Statement.LockContention value to set.

Returns:FindStatement

FindStatement

Annotations
@Override
lockSharedback to summary
public FindStatement lockShared()

Implements com.mysql.cj.xdevapi.FindStatement.lockShared.

Doc from com.mysql.cj.xdevapi.FindStatement.lockShared.

Locks matching rows against updates.

Returns:FindStatement

FindStatement

Annotations
@Override
lockSharedback to summary
public FindStatement lockShared(Statement.LockContention lockContention)

Implements com.mysql.cj.xdevapi.FindStatement.lockShared.

Doc from com.mysql.cj.xdevapi.FindStatement.lockShared.

Locks matching rows against updates using the provided lock contention option.

Parameters
lockContention:Statement.LockContention

The com.mysql.cj.xdevapi.Statement.LockContention value to set.

Returns:FindStatement

FindStatement

Annotations
@Override
whereback to summary
public FindStatement where(String searchCondition)

Overrides com.mysql.cj.xdevapi.FilterableStatement.where.

Doc from com.mysql.cj.xdevapi.FilterableStatement.where.

Deprecated

Deprecated in Connector/J 8.0.17. Please use filter criteria in the operation starting method.

Add search condition to this statement.

table.delete().where("age == 13").execute();
Parameters
searchCondition:String

expression

Returns:FindStatement

this statement

Annotations
@Deprecated
@Override