Class: Arel::Nodes::InsertStatement

Inherits:
Node
  • Object
show all
Defined in:
lib/arel/nodes/insert_statement.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#and, #each, #not, #or, #to_sql

Constructor Details

#initializeInsertStatement

Returns a new instance of InsertStatement.



6
7
8
9
10
# File 'lib/arel/nodes/insert_statement.rb', line 6

def initialize
  @relation = nil
  @columns  = []
  @values   = nil
end

Instance Attribute Details

#columnsObject

Returns the value of attribute columns.



4
5
6
# File 'lib/arel/nodes/insert_statement.rb', line 4

def columns
  @columns
end

#relationObject

Returns the value of attribute relation.



4
5
6
# File 'lib/arel/nodes/insert_statement.rb', line 4

def relation
  @relation
end

#valuesObject

Returns the value of attribute values.



4
5
6
# File 'lib/arel/nodes/insert_statement.rb', line 4

def values
  @values
end

Instance Method Details

#initialize_copy(other) ⇒ Object



12
13
14
15
16
# File 'lib/arel/nodes/insert_statement.rb', line 12

def initialize_copy other
  super
  @columns = @columns.clone
  @values =  @values.clone if @values
end