Class: HBase::Table::Mutation::Mutator
- Inherits:
-
Object
- Object
- HBase::Table::Mutation::Mutator
- Defined in:
- lib/hbase-jruby/table/mutation.rb
Instance Attribute Summary collapse
-
#mutations ⇒ Object
readonly
Returns the value of attribute mutations.
Instance Method Summary collapse
- #delete(*args) ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(mutation, rowkey) ⇒ Mutator
constructor
A new instance of Mutator.
- #put(props) ⇒ Object
Constructor Details
#initialize(mutation, rowkey) ⇒ Mutator
Returns a new instance of Mutator.
115 116 117 118 119 |
# File 'lib/hbase-jruby/table/mutation.rb', line 115 def initialize mutation, rowkey @mutation = mutation @rowkey = rowkey @mutations = [] end |
Instance Attribute Details
#mutations ⇒ Object (readonly)
Returns the value of attribute mutations.
109 110 111 |
# File 'lib/hbase-jruby/table/mutation.rb', line 109 def mutations @mutations end |
Instance Method Details
#delete(*args) ⇒ Object
127 128 129 130 |
# File 'lib/hbase-jruby/table/mutation.rb', line 127 def delete *args @mutations << @mutation.delete(@rowkey, *args) self end |
#empty? ⇒ Boolean
111 112 113 |
# File 'lib/hbase-jruby/table/mutation.rb', line 111 def empty? @mutations.empty? end |
#put(props) ⇒ Object
122 123 124 125 |
# File 'lib/hbase-jruby/table/mutation.rb', line 122 def put props @mutations << @mutation.put(@rowkey, props) self end |