Reference documentation and code samples for the Cloud Bigtable Client class ConditionFilter.
Evaluates one of two filters, depending on the outcome of the predicate filter.
Example:
use Google\Cloud\Bigtable\Filter;
$conditionFilter = Filter::condition(Filter::key()->regex('prefix.*'));
Namespace
Google \ Cloud \ Bigtable \ FilterMethods
__construct
Parameter | |
---|---|
Name | Description |
predicateFilter |
FilterInterface
A predicate filter. |
then
Adds a true filter to the condition filter. This filter will be applied if the predicate filter returns any results.
Example:
use Google\Cloud\Bigtable\Filter;
$conditionFilter->then(
Filter::label('hasPrefix')
);
Parameter | |
---|---|
Name | Description |
trueFilter |
FilterInterface
A filter to be evaluted when the predicate evalutes to true. |
Returns | |
---|---|
Type | Description |
ConditionFilter |
otherwise
Adds a false filter to condition filter. This filter will be applied if the predicate filter does not return results.
Example:
use Google\Cloud\Bigtable\Filter;
$conditionFilter->otherwise(
Filter::value()->strip()
);
Parameter | |
---|---|
Name | Description |
falseFilter |
FilterInterface
A filter to be evaluated when the predicate evalutes to false. |
Returns | |
---|---|
Type | Description |
ConditionFilter |
toProto
Get the proto representation of the filter.
Returns | |
---|---|
Type | Description |
Google\Cloud\Bigtable\V2\RowFilter |