Class: Apache::Hadoop::Hbase::Thrift2::TMutation
- Inherits:
-
Thrift::Union
- Object
- Thrift::Union
- Apache::Hadoop::Hbase::Thrift2::TMutation
- Includes:
- Thrift::Struct_Union
- Defined in:
- lib/hbase/hbase_types.rb
Overview
Atomic mutation for the specified row. It can be either Put or Delete.
Constant Summary collapse
- PUT =
1- DELETESINGLE =
2- FIELDS =
{ PUT => {:type => ::Thrift::Types::STRUCT, :name => 'put', :class => ::Apache::Hadoop::Hbase::Thrift2::TPut}, DELETESINGLE => {:type => ::Thrift::Types::STRUCT, :name => 'deleteSingle', :class => ::Apache::Hadoop::Hbase::Thrift2::TDelete} }
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.deleteSingle(val) ⇒ Object
425 426 427 |
# File 'lib/hbase/hbase_types.rb', line 425 def deleteSingle(val) TMutation.new(:deleteSingle, val) end |
.put(val) ⇒ Object
421 422 423 |
# File 'lib/hbase/hbase_types.rb', line 421 def put(val) TMutation.new(:put, val) end |
Instance Method Details
#struct_fields ⇒ Object
438 |
# File 'lib/hbase/hbase_types.rb', line 438 def struct_fields; FIELDS; end |
#validate ⇒ Object
440 441 442 |
# File 'lib/hbase/hbase_types.rb', line 440 def validate raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil? end |