Specifies a single filter condition, such as column_a>5
. SingleColumnValueFilter is used for the conditional update and filter features.
Data structure
message SingleColumnValueFilter {
required ComparatorType comparator = 1;
required string column_name = 2;
required bytes column_value = 3;
required bool filter_if_missing = 4;
required bool latest_version_only = 5;
optional ValueTransferRule value_transfer_rule =6;
}
Parameter | Type | Required | Description |
comparator | Yes | The relational operator. | |
column_name | string | Yes | The name of the column |
column_value | bytes | Yes | The column value after PlainBuffer encoding. |
filter_if_missing | bool | Yes | Specifies whether the filter condition is applicable when the specified column in a row does not exist. Valid values:
For example, if the filter condition is column_a>0 and filter_if_missing is set to true, when column_a does not exist in a row, the row is kept. |
latest_version_only | bool | Yes | Specifies whether the filter condition applies only to the latest version. Valid values:
|
value_transfer_rule | No | Converts a string to the String, Integer, or Double type after the string is matched by using a regular expression. If you store column data in a custom format such as JSON string and want to filter and query the column data by using a subfield value, you must configure this parameter. |
References
You can use the conditional update feature when you call the PutRow, UpdateRow, DeleteRow, or BatchWriteRow operation.
You can use the filter feature when you call the GetRow, GetRange, or BatchGetRow operation.