public class SingleColumnValueFilter extends ColumnValueFilter
Possible column-value comparison relationships include: EQUAL(=), NOT_EQUAL(!=), GREATER_THAN(>), GREATER_EQUAL(>=), LESS_THAN(<), and LESS_EQUAL(<=).
Since the attribute columns in a TableStore row are not fixed, it's possible that a column specified in the filter condition may not exist in that row. In such cases, the passIfMissing parameter controls the filtering result for that row.
passIfMissing is set to true, then if the column does not exist in the row, the row will be returned;
If passIfMissing is set to false, then if the column does not exist in the row, the row will not be returned.
The default value is true.
Since TableStore attribute columns may have multiple versions, there might be cases where one version of the column matches the given value while another version does not.
In such cases, thelatestVersionsOnly parameter controls the filtering result for that row.
If latestVersionsOnly is set to true, only the latest version of the value will be compared. Otherwise, all versions (the latest max_versions) of the column will be compared,
and if any version matches, the condition is considered satisfied. The default value is true.| 限定符和类型 | 类和说明 |
|---|---|
static class |
SingleColumnValueFilter.CompareOperator |
| 构造器和说明 |
|---|
SingleColumnValueFilter(String columnName,
SingleColumnValueFilter.CompareOperator operator,
ColumnValue columnValue)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getColumnName()
Get the column name.
|
ColumnValue |
getColumnValue()
Get the comparison value of the column.
|
FilterType |
getFilterType() |
SingleColumnValueFilter.CompareOperator |
getOperator()
Get the comparison operator for the column.
|
boolean |
isLatestVersionsOnly()
Returns the value of the set latestVersionsOnly.
|
boolean |
isPassIfMissing()
Returns the value of the set passIfMissing.
|
com.aliyun.ots.thirdparty.com.google.protobuf.ByteString |
serialize() |
SingleColumnValueFilter |
setColumnName(String columnName)
Sets the name of the column.
|
SingleColumnValueFilter |
setColumnValue(ColumnValue columnValue)
Sets the comparison value for the column.
|
SingleColumnValueFilter |
setLatestVersionsOnly(boolean latestVersionsOnly)
Set latestVersionsOnly.
|
SingleColumnValueFilter |
setOperator(SingleColumnValueFilter.CompareOperator operator)
Sets the column comparison operator.
|
SingleColumnValueFilter |
setPassIfMissing(boolean passIfMissing)
Set passIfMissing.
|
SingleColumnValueCondition |
toCondition() |
public SingleColumnValueFilter(String columnName, SingleColumnValueFilter.CompareOperator operator, ColumnValue columnValue)
columnName - The name of the columnoperator - The comparison functioncolumnValue - The value of the columnpublic SingleColumnValueFilter.CompareOperator getOperator()
public SingleColumnValueFilter setOperator(SingleColumnValueFilter.CompareOperator operator)
operator - The comparison operatorpublic String getColumnName()
public SingleColumnValueFilter setColumnName(String columnName)
columnName - the name of the columnpublic ColumnValue getColumnValue()
public SingleColumnValueFilter setColumnValue(ColumnValue columnValue)
columnValue - The comparison value for the column.public boolean isPassIfMissing()
public SingleColumnValueFilter setPassIfMissing(boolean passIfMissing)
Since the attribute columns of a row in TableStore are not fixed, there might be cases where the column with a filter condition does not exist in that row. In such cases, the passIfMissing parameter controls the filtering result for that row.
If passIfMissing is set to true, the row will be returned if the column does not exist in that row;
If passIfMissing is set to false, the row will not be returned if the column does not exist in that row.
The default value is true.
passIfMissing - public boolean isLatestVersionsOnly()
public SingleColumnValueFilter setLatestVersionsOnly(boolean latestVersionsOnly)
Since property columns in TableStore may have multiple versions, there might be cases where one version's value matches the given value while another version's does not,
at this point, thelatestVersionsOnly parameter controls the filtering result for such cases.
If latestVersionsOnly is set to true, only the latest version will be compared. Otherwise, all versions (the latest max_versions) of that column will be compared,
and if any version matches, the filter condition is considered met. The default value is true.
latestVersionsOnly - public SingleColumnValueCondition toCondition()
public FilterType getFilterType()
public com.aliyun.ots.thirdparty.com.google.protobuf.ByteString serialize()
Copyright © 2025. All Rights Reserved.