Class: SqlStmt::Select

Inherits:
FromQuery show all
Defined in:
lib/sqlstmt/select.rb

Instance Attribute Summary

Attributes inherited from Query

#fields, #joins, #tables, #wheres

Instance Method Summary collapse

Methods inherited from FromQuery

#group_by, #initialize, #limit, #order_by

Methods inherited from Query

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

Constructor Details

This class inherits a constructor from SqlStmt::FromQuery

Instance Method Details

#distinctObject



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

def distinct
  @distinct = true
  self
end

#field(*field_exprs) ⇒ Object



6
7
8
9
# File 'lib/sqlstmt/select.rb', line 6

def field(*field_exprs)
  @fields.concat(field_exprs)
  self
end

#into(str) ⇒ Object



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

def into(str)
  @into = str
  self
end