Class: TableSaw::Queries::ExecuteInsertStatement

Inherits:
Object
  • Object
show all
Defined in:
lib/table_saw/queries/execute_insert_statement.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(statement, row) ⇒ ExecuteInsertStatement

Returns a new instance of ExecuteInsertStatement.



8
9
10
11
# File 'lib/table_saw/queries/execute_insert_statement.rb', line 8

def initialize(statement, row)
  @statement = statement
  @row = row
end

Instance Attribute Details

#rowObject (readonly)

Returns the value of attribute row.



6
7
8
# File 'lib/table_saw/queries/execute_insert_statement.rb', line 6

def row
  @row
end

#statementObject (readonly)

Returns the value of attribute statement.



6
7
8
# File 'lib/table_saw/queries/execute_insert_statement.rb', line 6

def statement
  @statement
end

Instance Method Details

#callObject



13
14
15
# File 'lib/table_saw/queries/execute_insert_statement.rb', line 13

def call
  "EXECUTE #{statement.name}(#{values});"
end