class BigShift::InsertRowsCommand
Public Class Methods
new(table_name, rows)
click to toggle source
# File lib/big_shift/commands/insert_rows_command.rb, line 3 def initialize(table_name, rows) self.table_id = table_name @rows = rows end
Public Instance Methods
body()
click to toggle source
# File lib/big_shift/commands/insert_rows_command.rb, line 16 def body { :rows => build_rows } end
endpoint()
click to toggle source
# File lib/big_shift/commands/insert_rows_command.rb, line 12 def endpoint 'insertAll' end
on_execute()
click to toggle source
# File lib/big_shift/commands/insert_rows_command.rb, line 8 def on_execute InsertRowsResponse.new post end
Private Instance Methods
build_rows()
click to toggle source
# File lib/big_shift/commands/insert_rows_command.rb, line 22 def build_rows @rows.map do |row| {:json => row} end end