2.13.2 (latest) 2.13.1 2.12.3 2.11.1 2.10.2 2.9.1 2.8.0 2.7.1 2.6.5 Reference documentation and code samples for the Cloud Bigtable API class Google::Cloud::Bigtable::ReadModifyWriteRule.

## ReadModifyWriteRule

Specifies an atomic read/modify/write operation on the latest value of the
specified column.

## Inherits

- Object

## Examples

Append value rule

```ruby
rule = Google::Cloud::Bigtable::ReadModifyWriteRule.append(
  "cf", "field01", "append-xyz"
)
```

increment value rule

```ruby
rule = Google::Cloud::Bigtable::ReadModifyWriteRule.increment(
  "cf", "field01", 1
)
```

## Methods

### .append

```ruby
def self.append(family, qualifier, value) -> Google::Cloud::Bigtable::ReadModifyWriteRule
```
Creates an instance of an append-value rule.
**Parameters**

- **family** (String) --- The name of the family to which the read/modify/write should be applied.
- **qualifier** (String) --- The qualifier of the column to which the read/modify/write should be applied.
- **value** (String) --- Rule specifying that `append_value` be appended to the existing value. If the targeted cell is unset, it will be treated as if it contains an empty string.
**Returns**

- ([Google::Cloud::Bigtable::ReadModifyWriteRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigtable/latest/Google-Cloud-Bigtable-ReadModifyWriteRule.md.txt))
**Example**

Append value rule

```ruby
rule = Google::Cloud::Bigtable::ReadModifyWriteRule.append(
  "cf", "field01", "append-xyz"
)
```

### .increment

```ruby
def self.increment(family, qualifier, amount) -> Google::Cloud::Bigtable::ReadModifyWriteRule
```
Creates an instance of an increment-amount rule.
**Parameters**

- **family** (String) --- The name of the family to which the read/modify/write should be applied.
- **qualifier** (String) --- The qualifier of the column to which the read/modify/write should be applied.
- **amount** (String) --- Rule specifying that `increment_amount` be added to the existing value. If the targeted cell is unset, it will be treated as if it contains a zero. Otherwise, the targeted cell must contain an 8-byte value (interpreted as a 64-bit big-endian signed integer), or the entire request will fail.
**Returns**

- ([Google::Cloud::Bigtable::ReadModifyWriteRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigtable/latest/Google-Cloud-Bigtable-ReadModifyWriteRule.md.txt))
**Example**

```ruby
rule = Google::Cloud::Bigtable::ReadModifyWriteRule.increment(
  "cf", "field01", 1
)
```

### #append

```ruby
def append(value) -> Google::Cloud::Bigtable::ReadModifyWriteRule
```
Sets the append value.
**Parameter**

- **value** (String)
**Returns**

- ([Google::Cloud::Bigtable::ReadModifyWriteRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigtable/latest/Google-Cloud-Bigtable-ReadModifyWriteRule.md.txt))

### #increment

```ruby
def increment(amount) -> Google::Cloud::Bigtable::ReadModifyWriteRule
```
Sets the increment amount.
**Parameter**

- **amount** (Integer)
**Returns**

- ([Google::Cloud::Bigtable::ReadModifyWriteRule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigtable/latest/Google-Cloud-Bigtable-ReadModifyWriteRule.md.txt))