Method: Azure::Table::Batch#insert

Defined in:
lib/azure/table/batch.rb

#insert(row_key, entity_values) ⇒ Object



205
206
207
208
209
210
211
212
213
214
215
# File 'lib/azure/table/batch.rb', line 205

def insert(row_key, entity_values)
  check_entity_key(row_key)

  body = Azure::Table::Serialization.hash_to_entry_xml({
      "PartitionKey" => partition,
      "RowKey" => row_key
    }.merge(entity_values) ).to_xml

  add_operation(:post, @table_service.entities_uri(table), body)
  self
end