Class: SqlStmt::FromQuery
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Query
#fields, #joins, #tables, #wheres
Instance Method Summary collapse
- #group_by(clause) ⇒ Object
-
#initialize ⇒ FromQuery
constructor
A new instance of FromQuery.
- #limit(clause) ⇒ Object
- #order_by(clause) ⇒ Object
Methods inherited from Query
#join, #join_using, #left_join, #left_join_using, #no_where, #optional_where, #table, #to_s, #where
Constructor Details
#initialize ⇒ FromQuery
Returns a new instance of FromQuery.
6 7 8 9 10 11 |
# File 'lib/sqlstmt/from_query.rb', line 6 def initialize super @group_by = nil @order_by = nil @limit = nil end |
Instance Method Details
#group_by(clause) ⇒ Object
13 14 15 16 |
# File 'lib/sqlstmt/from_query.rb', line 13 def group_by(clause) @group_by = clause self end |
#limit(clause) ⇒ Object
23 24 25 26 |
# File 'lib/sqlstmt/from_query.rb', line 23 def limit(clause) @limit = clause self end |
#order_by(clause) ⇒ Object
18 19 20 21 |
# File 'lib/sqlstmt/from_query.rb', line 18 def order_by(clause) @order_by = clause self end |