Class: Metadata::BatchWriteRowRequest
- Inherits:
-
Object
- Object
- Metadata::BatchWriteRowRequest
- Defined in:
- lib/tablestore/metadata.rb
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
Instance Method Summary collapse
- #add(table_item) ⇒ Object
-
#initialize ⇒ BatchWriteRowRequest
constructor
A new instance of BatchWriteRowRequest.
Constructor Details
#initialize ⇒ BatchWriteRowRequest
Returns a new instance of BatchWriteRowRequest.
320 321 322 |
# File 'lib/tablestore/metadata.rb', line 320 def initialize self.items = {} end |
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items.
318 319 320 |
# File 'lib/tablestore/metadata.rb', line 318 def items @items end |
Instance Method Details
#add(table_item) ⇒ Object
324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/tablestore/metadata.rb', line 324 def add(table_item) """ 说明:添加tablestore.metadata.TableInBatchWriteRowItem对象 注意:对象内部存储tablestore.metadata.TableInBatchWriteRowItem对象采用‘字典’的形式,Key是表 的名字,因此如果插入同表名的对象,那么之前的对象将被覆盖。 """ unless table_item.is_a?(TableInBatchWriteRowItem) raise TableStoreClientError.new("The input table_item should be an instance of TableInBatchWriteRowItem, not #{table_item.class}") end self.items[table_item.table_name] = table_item end |