Method: Cranium::Transformation::Sequence#next_value
- Defined in:
- lib/cranium/transformation/sequence.rb
#next_value ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/cranium/transformation/sequence.rb', line 13 def next_value if @current_value.nil? @current_value = Cranium::Database.connection["SELECT nextval('#{@name}') AS next_value"].first[:next_value] else @current_value += 1 end end |