Sha256: 683d1bc7e31c3020a8c874d2340a234bc57cf9fd8f47da012f27fd5a7f0e8289
Contents?: true
Size: 857 Bytes
Versions: 25
Compression:
Stored size: 857 Bytes
Contents
module ActiveRecord::Turntable::ActiveRecordExt module Sequencer extend ActiveSupport::Concern included do include DatabaseStatements alias_method_chain :prefetch_primary_key?, :turntable end module DatabaseStatements def default_sequence_name(table_name, pk = nil) ActiveRecord::Turntable::Sequencer.sequence_name(table_name, pk) end end def prefetch_primary_key_with_turntable?(table_name = nil) ActiveRecord::Turntable::Sequencer.has_sequencer?(table_name) end def next_sequence_value(sequence_name) ActiveRecord::Turntable::Sequencer.sequences[sequence_name].next_sequence_value(sequence_name) end def current_sequence_value(sequence_name) ActiveRecord::Turntable::Sequencer.sequences[sequence_name].current_sequence_value(sequence_name) end end end
Version data entries
25 entries across 25 versions & 1 rubygems