Cloud Bigtable Client - Class ConditionFilter (1.20.3)

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.*'));

Methods

__construct

Parameter
NameDescription
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
NameDescription
trueFilter Google\Cloud\Bigtable\Filter\FilterInterface

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

Returns
TypeDescription
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
NameDescription
falseFilter Google\Cloud\Bigtable\Filter\FilterInterface

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

Returns
TypeDescription
Google\Cloud\Bigtable\Filter\ConditionFilter