Cloud Bigtable Client - Class ConditionFilter (2.5.0)

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 \ Filter

Methods

__construct

Parameter
Name Description
predicateFilter Google\Cloud\Bigtable\Filter\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 Google\Cloud\Bigtable\Filter\FilterInterface

A filter to be evaluted when the predicate evalutes to true.

Returns
Type Description
Google\Cloud\Bigtable\Filter\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 Google\Cloud\Bigtable\Filter\FilterInterface

A filter to be evaluated when the predicate evalutes to false.

Returns
Type Description
Google\Cloud\Bigtable\Filter\ConditionFilter

toProto

Get the proto representation of the filter.

Returns
Type Description
Google\Cloud\Bigtable\V2\RowFilter