Class: Hypertable::ThriftGen::Key

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/hypertable/gen-rb/client_types.rb

Overview

Defines a cell key

<dl>

<dt>row</dt>
<dd>Specifies the row key. Note, it cannot contain null characters.
If a row key is not specified in a return cell, it's assumed to
be the same as the previous cell</dd>

<dt>column_family</dt>
<dd>Specifies the column family</dd>

<dt>column_qualifier</dt>
<dd>Specifies the column qualifier. A column family must be specified.</dd>

<dt>timestamp</dt>
<dd>Nanoseconds since epoch for the cell<dd>

<dt>revision</dt>
<dd>A 64-bit revision number for the cell</dd>

<dt>flag</dt>
<dd>A 16-bit integer indicating the state of the cell</dd>

</dl>

Constant Summary collapse

ROW =
1
COLUMN_FAMILY =
2
COLUMN_QUALIFIER =
3
TIMESTAMP =
4
REVISION =
5
FLAG =
6
FIELDS =
{
  ROW => {:type => ::Thrift::Types::STRING, :name => 'row'},
  COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
  COLUMN_QUALIFIER => {:type => ::Thrift::Types::STRING, :name => 'column_qualifier'},
  TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
  REVISION => {:type => ::Thrift::Types::I64, :name => 'revision', :optional => true},
  FLAG => {:type => ::Thrift::Types::I32, :name => 'flag', :default =>             255, :enum_class => Hypertable::ThriftGen::KeyFlag}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



220
# File 'lib/hypertable/gen-rb/client_types.rb', line 220

def struct_fields; FIELDS; end

#validateObject



222
223
224
225
226
# File 'lib/hypertable/gen-rb/client_types.rb', line 222

def validate
  unless @flag.nil? || Hypertable::ThriftGen::KeyFlag::VALID_VALUES.include?(@flag)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field flag!')
  end
end