Class: Hypertable::ThriftGen::Key
- Inherits:
-
Object
- Object
- Hypertable::ThriftGen::Key
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/hypertable/gen-rb/client_types.rb
Overview
Defines a cell key
- row
- 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
- column_family
- Specifies the column family
- column_qualifier
- Specifies the column qualifier. A column family must be specified.
- timestamp
- Nanoseconds since epoch for the cell
- revision
- A 64-bit revision number for the cell
- flag
- A 16-bit integer indicating the state of the cell
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_fields ⇒ Object
220 |
# File 'lib/hypertable/gen-rb/client_types.rb', line 220 def struct_fields; FIELDS; end |
#validate ⇒ Object
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 |