method IBigtableRow.conditionalMutate
IBigtableRow.conditionalMutate(
test: readonly BigtableFilter[],
branches: { readonly onMatch?: readonly BigtableMutation[]; readonly onNoMatch?: readonly BigtableMutation[]; }
): Promise<boolean>

Applies one branch of a CheckAndMutateRow atomically.

Parameters

test: readonly BigtableFilter[]

The predicate evaluated against the row

branches: { readonly onMatch?: readonly BigtableMutation[]; readonly onNoMatch?: readonly BigtableMutation[]; }

The mutation lists for a matching and a non-matching row

Return Type

Promise<boolean>

true when the test matched (so onMatch ran), false otherwise

Usage

import { type IBigtableRow } from "database-plugin/src/index.ts";