STMT_T - statement interfaceRES_T - result interfacepublic abstract class FilterableStatement<STMT_T,RES_T> extends PreparableStatement<RES_T> implements Statement<STMT_T,RES_T>
PreparableStatement.PreparableStatementFinalizer, PreparableStatement.PreparedStateStatement.LockContention| Modifier and Type | Field and Description |
|---|---|
protected FilterParams |
filterParams |
mysqlxSession, preparedState, preparedStatementId| Constructor and Description |
|---|
FilterableStatement(FilterParams filterParams)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
STMT_T |
bind(java.lang.String argName,
java.lang.Object value)
Bind the named argument to the given value.
|
STMT_T |
clearBindings()
Clear all bindings for this statement.
|
boolean |
isRelational()
Are relational columns identifiers allowed in this statement?
|
STMT_T |
limit(long numberOfRows)
Add row limit to this statement.
|
STMT_T |
offset(long limitOffset)
Add maximum number of rows to skip before find others.
|
STMT_T |
orderBy(java.lang.String... sortFields)
Add sort expressions to this statement.
|
STMT_T |
sort(java.lang.String... sortFields)
Add sort expressions to this statement.
|
STMT_T |
where(java.lang.String searchCondition)
Add search condition to this statement.
|
deallocatePrepared, execute, executePreparedStatement, executeStatement, getMessageBuilder, getPrepareStatementXMessage, resetPrepareState, setReprepareStateprotected FilterParams filterParams
public FilterableStatement(FilterParams filterParams)
filterParams - FilterParams object.public STMT_T where(java.lang.String searchCondition)
table.delete().where("age == 13").execute();
searchCondition - expressionpublic STMT_T sort(java.lang.String... sortFields)
orderBy(String...).
DocResult docs = this.collection.find().orderBy("$._id").execute();
docs = this.collection.find().sort("$.x", "$.y").execute();
sortFields - sort expressionspublic STMT_T orderBy(java.lang.String... sortFields)
DocResult docs = this.collection.find().orderBy("$._id").execute();
docs = this.collection.find().sort("$.x", "$.y").execute();
sortFields - sort expressionspublic STMT_T limit(long numberOfRows)
For example, to find only 3 rows:
docs = this.collection.find().orderBy("$._id").limit(3).execute();
numberOfRows - maximum rows to processpublic STMT_T offset(long limitOffset)
For example, to skip 2 rows:
docs = this.collection.find().orderBy("$._id").offset(2).execute();
limitOffset - number of rows to skippublic boolean isRelational()
public STMT_T clearBindings()
StatementclearBindings in interface Statement<STMT_T,RES_T>