Class: SqlStmt::InsertSelect

Inherits:
FromQuery show all
Includes:
ValueUtil
Defined in:
lib/sqlstmt/insert_select.rb

Instance Attribute Summary

Attributes inherited from Query

#fields, #joins, #tables, #wheres

Instance Method Summary collapse

Methods included from ValueUtil

#field, #fieldq

Methods inherited from FromQuery

#group_by, #limit, #order_by

Methods inherited from Query

#join, #join_using, #left_join, #left_join_using, #no_where, #optional_where, #table, #to_s, #where

Constructor Details

#initializeInsertSelect

Returns a new instance of InsertSelect.



10
11
12
13
14
# File 'lib/sqlstmt/insert_select.rb', line 10

def initialize
  super
  @values = []
  @into_table = nil
end

Instance Method Details

#distinctObject



16
17
18
19
# File 'lib/sqlstmt/insert_select.rb', line 16

def distinct
  @distinct = true
  self
end

#into(table) ⇒ Object



21
22
23
24
# File 'lib/sqlstmt/insert_select.rb', line 21

def into(table)
  @into_table = table
  self
end