Class: SqlStmt::InsertSelect
- Includes:
- ValueUtil
- Defined in:
- lib/sqlstmt/insert_select.rb
Instance Attribute Summary
Attributes inherited from Query
#fields, #joins, #tables, #wheres
Instance Method Summary collapse
- #distinct ⇒ Object
- #ignore ⇒ Object
-
#initialize ⇒ InsertSelect
constructor
A new instance of InsertSelect.
- #insert_into(table) ⇒ Object
Methods included from ValueUtil
Methods inherited from FromQuery
Methods inherited from Query
#includes_table?, #join, #left_join, #limit, #no_where, #optional_join, #optional_where, #table, #to_s, #where
Constructor Details
#initialize ⇒ InsertSelect
Returns a new instance of InsertSelect.
10 11 12 13 14 15 |
# File 'lib/sqlstmt/insert_select.rb', line 10 def initialize super @values = [] @distinct = @ignore = false @into_table = nil end |
Instance Method Details
#distinct ⇒ Object
17 18 19 20 |
# File 'lib/sqlstmt/insert_select.rb', line 17 def distinct @distinct = true self end |
#ignore ⇒ Object
22 23 24 25 |
# File 'lib/sqlstmt/insert_select.rb', line 22 def ignore @ignore = true self end |
#insert_into(table) ⇒ Object
27 28 29 30 |
# File 'lib/sqlstmt/insert_select.rb', line 27 def insert_into(table) @into_table = table self end |