Module: ActiveRecord::Turntable::ActiveRecordExt::Sequencer
- Defined in:
- lib/active_record/turntable/active_record_ext/sequencer.rb
Instance Method Summary collapse
- #current_sequence_value(sequence_name) ⇒ Object
- #next_sequence_value ⇒ Object
- #prefetch_primary_key? ⇒ Boolean
- #reset_sequence_name ⇒ Object
Instance Method Details
#current_sequence_value(sequence_name) ⇒ Object
19 20 21 |
# File 'lib/active_record/turntable/active_record_ext/sequencer.rb', line 19 def current_sequence_value(sequence_name) turntable_sequencer.current_sequence_value(sequence_name) end |
#next_sequence_value ⇒ Object
3 4 5 6 7 |
# File 'lib/active_record/turntable/active_record_ext/sequencer.rb', line 3 def next_sequence_value return super unless sequencer_enabled? turntable_sequencer.next_sequence_value(sequence_name) end |
#prefetch_primary_key? ⇒ Boolean
15 16 17 |
# File 'lib/active_record/turntable/active_record_ext/sequencer.rb', line 15 def prefetch_primary_key? sequencer_enabled? || super end |
#reset_sequence_name ⇒ Object
9 10 11 12 13 |
# File 'lib/active_record/turntable/active_record_ext/sequencer.rb', line 9 def reset_sequence_name return super unless sequencer_enabled? turntable_sequencer.sequence_name(table_name, primary_key) end |