Class: Arel::Nodes::InsertStatement
- Defined in:
 - lib/arel/nodes/insert_statement.rb
 
Instance Attribute Summary collapse
- 
  
    
      #columns  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute columns.
 - 
  
    
      #relation  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute relation.
 - 
  
    
      #select  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute select.
 - 
  
    
      #values  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute values.
 
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
 - #hash ⇒ Object
 - 
  
    
      #initialize  ⇒ InsertStatement 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of InsertStatement.
 - #initialize_copy(other) ⇒ Object
 
Methods inherited from Node
#and, #each, #not, #or, #to_sql
Methods included from FactoryMethods
#coalesce, #create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, #lower
Constructor Details
#initialize ⇒ InsertStatement
Returns a new instance of InsertStatement.
      8 9 10 11 12 13 14  | 
    
      # File 'lib/arel/nodes/insert_statement.rb', line 8 def initialize super() @relation = nil @columns = [] @values = nil @select = nil end  | 
  
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
      6 7 8  | 
    
      # File 'lib/arel/nodes/insert_statement.rb', line 6 def columns @columns end  | 
  
#relation ⇒ Object
Returns the value of attribute relation.
      6 7 8  | 
    
      # File 'lib/arel/nodes/insert_statement.rb', line 6 def relation @relation end  | 
  
#select ⇒ Object
Returns the value of attribute select.
      6 7 8  | 
    
      # File 'lib/arel/nodes/insert_statement.rb', line 6 def select @select end  | 
  
#values ⇒ Object
Returns the value of attribute values.
      6 7 8  | 
    
      # File 'lib/arel/nodes/insert_statement.rb', line 6 def values @values end  | 
  
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
      27 28 29 30 31 32 33  | 
    
      # File 'lib/arel/nodes/insert_statement.rb', line 27 def eql?(other) self.class == other.class && self.relation == other.relation && self.columns == other.columns && self.select == other.select && self.values == other.values end  | 
  
#hash ⇒ Object
      23 24 25  | 
    
      # File 'lib/arel/nodes/insert_statement.rb', line 23 def hash [@relation, @columns, @values, @select].hash end  | 
  
#initialize_copy(other) ⇒ Object
      16 17 18 19 20 21  | 
    
      # File 'lib/arel/nodes/insert_statement.rb', line 16 def initialize_copy(other) super @columns = @columns.clone @values = @values.clone if @values @select = @select.clone if @select end  |