Class: Google::Cloud::Bigtable::Row

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/bigtable/row.rb

Overview

Row

Row structure based on merged cells using read row state.

Defined Under Namespace

Classes: Cell

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key = nil) ⇒ Row

Creates a flat row object.

Parameters:

  • key (String) (defaults to: nil)

    Row key name.



109
110
111
112
# File 'lib/google/cloud/bigtable/row.rb', line 109

def initialize key = nil
  @key = key
  @cells = Hash.new { |h, k| h[k] = [] }
end

Instance Attribute Details

#cellsHash{String => Array<Google::Cloud::Bigtable::Row::Cell>}

Returns Row cells.

Returns:



102
103
104
# File 'lib/google/cloud/bigtable/row.rb', line 102

def cells
  @cells
end

#keyString

Returns Row key.

Returns:

  • (String)

    Row key.



97
98
99
# File 'lib/google/cloud/bigtable/row.rb', line 97

def key
  @key
end

Instance Method Details

#column_familiesArray<String>

List of column families names.

Returns:

  • (Array<String>)


119
120
121
# File 'lib/google/cloud/bigtable/row.rb', line 119

def column_families
  @cells.keys
end