Module: Flounder::Query::Returning

Included in:
Insert, Update
Defined in:
lib/flounder/query/returning.rb

Instance Method Summary collapse

Instance Method Details

#returning(fields) ⇒ Object



9
10
11
12
13
# File 'lib/flounder/query/returning.rb', line 9

def returning fields
  @returning_fields = fields

  self
end

#returning_fieldsObject



5
6
7
# File 'lib/flounder/query/returning.rb', line 5

def returning_fields
  @returning_fields || '*'
end

#to_sqlObject



15
16
17
# File 'lib/flounder/query/returning.rb', line 15

def to_sql
  super << " RETURNING #{returning_fields}"
end