Class: Google::Cloud::Bigtable::RowFilter::ConditionFilter
- Inherits:
-
Object
- Object
- Google::Cloud::Bigtable::RowFilter::ConditionFilter
- Defined in:
- lib/google/cloud/bigtable/row_filter/condition_filter.rb
Overview
ConditionFilter
A RowFilter that evaluates one of two possible RowFilters, depending on whether or not a predicate RowFilter outputs any cells from the input row.
IMPORTANT NOTE: The predicate filter does not execute atomically with the true and false filters, which may lead to inconsistent or unexpected results. Additionally, condition filters have poor performance, especially when filters are set for the false condition.
If predicate_filter
outputs any cells, then true_filter
will be
evaluated on the input row. Otherwise, false_filter
will be evaluated.
Instance Method Summary collapse
-
#on_match(filter) ⇒ Google::Cloud::Bigtable::RowFilter::ConditionFilter
Sets a true filter on predicate-filter match.
-
#otherwise(filter) ⇒ Google::Cloud::Bigtable::RowFilter::ConditionFilter
Set otherwise(false) filter.
Instance Method Details
#on_match(filter) ⇒ Google::Cloud::Bigtable::RowFilter::ConditionFilter
Sets a true filter on predicate-filter match.
The filter to apply to the input row if predicate_filter
returns any
results. If not provided, no results will be returned in the true case.
73 74 75 76 |
# File 'lib/google/cloud/bigtable/row_filter/condition_filter.rb', line 73 def on_match filter @grpc.true_filter = filter.to_grpc self end |
#otherwise(filter) ⇒ Google::Cloud::Bigtable::RowFilter::ConditionFilter
Set otherwise(false) filter.
The filter to apply to the input row if predicate_filter
does not
return any results. If not provided, no results will be returned in the
false case.
98 99 100 101 |
# File 'lib/google/cloud/bigtable/row_filter/condition_filter.rb', line 98 def otherwise filter @grpc.false_filter = filter.to_grpc self end |