Class: SqlStmt::Select
Instance Attribute Summary
Attributes inherited from Query
#fields, #joins, #tables, #wheres
Instance Method Summary
collapse
Methods inherited from FromQuery
#group_by, #having, #order_by
Methods inherited from Query
#includes_table?, #join, #left_join, #limit, #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
27
28
29
30
|
# File 'lib/sqlstmt/select.rb', line 27
def into_outfile(str)
@into = "OUTFILE #{str}"
self
end
|
#straight_join ⇒ Object
22
23
24
25
|
# File 'lib/sqlstmt/select.rb', line 22
def straight_join
@straight_join = true
self
end
|