public class SingleColumnValueCondition extends Object implements ColumnCondition
Supported comparison relationships include: EQUAL(=), NOT_EQUAL(!=), GREATER_THAN(>), GREATER_EQUAL(>=), LESS_THAN(<), and LESS_EQUAL(<=).
Since the attribute columns in a single row of TableStore are not fixed, there may be cases where the column in the condition does not exist in that row.
In such cases, the passIfMissing parameter controls whether the condition passes.
passIfMissing is set to true, the condition passes if the column does not exist in that row;
If passIfMissing is set to false, the condition fails if the column does not exist in that row.
The default value is true.
Since TableStore's attribute columns may have multiple versions, there might be cases where one version of the column matches the given value while another does not.
In such cases, the latestVersionsOnly parameter controls the filtering result for that row.
If latestVersionsOnly is set to true, only the latest version of the value will be compared, with the default value being true.
It should be noted that if latestVersionsOnly is set to false, all versions (the latest max_versions) of the column will be compared,
and the condition is considered met if any version matches.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
SingleColumnValueCondition.CompareOperator |
| 构造器和说明 |
|---|
SingleColumnValueCondition(String columnName,
SingleColumnValueCondition.CompareOperator operator,
ColumnValue columnValue)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getColumnName()
Get the column name.
|
ColumnValue |
getColumnValue()
Get the comparison value of the column.
|
ColumnConditionType |
getConditionType() |
SingleColumnValueCondition.CompareOperator |
getOperator()
Get the comparison operator for the column.
|
boolean |
isLatestVersionsOnly()
Returns the value of the set latestVersionsOnly.
|
boolean |
isPassIfMissing()
Returns the value of passIfMissing that has been set.
|
com.aliyun.ots.thirdparty.com.google.protobuf.ByteString |
serialize() |
SingleColumnValueCondition |
setColumnName(String columnName)
Sets the name of the column.
|
SingleColumnValueCondition |
setColumnValue(ColumnValue columnValue)
Sets the comparison value for the column.
|
SingleColumnValueCondition |
setLatestVersionsOnly(boolean latestVersionsOnly)
Set latestVersionsOnly.
|
SingleColumnValueCondition |
setOperator(SingleColumnValueCondition.CompareOperator operator)
Set the column comparison operator.
|
SingleColumnValueCondition |
setPassIfMissing(boolean passIfMissing)
Set passIfMissing.
|
SingleColumnValueFilter |
toFilter() |
public SingleColumnValueCondition(String columnName, SingleColumnValueCondition.CompareOperator operator, ColumnValue columnValue)
columnName - The name of the columnoperator - The comparison functioncolumnValue - The value of the columnpublic SingleColumnValueCondition.CompareOperator getOperator()
public SingleColumnValueCondition setOperator(SingleColumnValueCondition.CompareOperator operator)
operator - The comparison operatorpublic String getColumnName()
public SingleColumnValueCondition setColumnName(String columnName)
columnName - the name of the columnpublic ColumnValue getColumnValue()
public SingleColumnValueCondition setColumnValue(ColumnValue columnValue)
columnValue - The comparison value for the column.public boolean isPassIfMissing()
public SingleColumnValueCondition setPassIfMissing(boolean passIfMissing)
Since the property columns of a TableStore row are not fixed, there may be cases where a column in the condition does not exist in that row. In this case, the passIfMissing parameter controls whether the condition passes.
If passIfMissing is set to true, the condition will pass if the column does not exist in the row;
If passIfMissing is set to false, the condition will fail if the column does not exist in the row.
The default value is true.
passIfMissing - public boolean isLatestVersionsOnly()
public SingleColumnValueCondition setLatestVersionsOnly(boolean latestVersionsOnly)
Since TableStore property columns may have multiple versions, there might be cases where one version of the column's value matches the given value while another version does not,
in this case, the latestVersionsOnly parameter controls the filtering result for the row.
If latestVersionsOnly is set to true, only the latest version's value will be compared. The default value is true.
It should be noted that if latestVersionsOnly is false, all versions (the latest max_versions) of the column will be compared, and if any version's value matches, the condition is considered satisfied.
latestVersionsOnly - public ColumnConditionType getConditionType()
getConditionType 在接口中 ColumnConditionpublic SingleColumnValueFilter toFilter()
public com.aliyun.ots.thirdparty.com.google.protobuf.ByteString serialize()
serialize 在接口中 ColumnConditionCopyright © 2025. All Rights Reserved.