Class: SqlStmt::Select
- Defined in:
- lib/sqlstmt/select.rb
Instance Attribute Summary
Attributes inherited from Query
#fields, #joins, #tables, #wheres
Instance Method Summary collapse
- #distinct ⇒ Object
- #field(*field_exprs) ⇒ Object
-
#initialize ⇒ Select
constructor
A new instance of Select.
- #into_outfile(str) ⇒ Object
Methods inherited from FromQuery
#group_by, #having, #limit, #order_by
Methods inherited from Query
#includes_table?, #join, #join_using, #left_join, #left_join_using, #no_where, #optional_join, #optional_where, #table, #to_s, #where
Constructor Details
#initialize ⇒ Select
Returns a new instance of Select.
6 7 8 9 10 |
# File 'lib/sqlstmt/select.rb', line 6 def initialize super @distinct = false @into = nil end |
Instance Method Details
#distinct ⇒ Object
17 18 19 20 |
# File 'lib/sqlstmt/select.rb', line 17 def distinct @distinct = true self end |
#field(*field_exprs) ⇒ Object
12 13 14 15 |
# File 'lib/sqlstmt/select.rb', line 12 def field(*field_exprs) @fields.concat(field_exprs) self end |
#into_outfile(str) ⇒ Object
22 23 24 25 |
# File 'lib/sqlstmt/select.rb', line 22 def into_outfile(str) @into = "OUTFILE #{str}" self end |