Module: TemporalTables

Defined in:
lib/temporal_tables.rb,
lib/temporal_tables/version.rb,
lib/temporal_tables/constants.rb,
lib/temporal_tables/whodunnit.rb,
lib/temporal_tables/arel_table.rb,
lib/temporal_tables/history_hook.rb,
lib/temporal_tables/temporal_class.rb,
lib/temporal_tables/temporal_adapter.rb,
lib/temporal_tables/relation_extensions.rb,
lib/temporal_tables/preloader_extensions.rb,
lib/temporal_tables/reflection_extensions.rb,
lib/temporal_tables/association_extensions.rb,
lib/temporal_tables/temporal_adapter_six_oh.rb,
lib/temporal_tables/connection_adapters/mysql_adapter.rb,
lib/temporal_tables/connection_adapters/postgresql_adapter.rb

Defined Under Namespace

Modules: AbstractReflectionExtensions, ArelTable, AssociationExtensions, ConnectionAdapters, HistoryHook, PreloaderExtensions, RelationExtensions, TemporalAdapter, TemporalAdapterSixOh, TemporalClass, Whodunnit Classes: Railtie

Constant Summary collapse

VERSION =
'2.0.0'
END_OF_TIME =
'9999-12-31'

Class Method Summary collapse

Class Method Details

.add_updated_by_field(type = :string, &block) ⇒ Object



74
75
76
77
78
79
80
81
82
# File 'lib/temporal_tables.rb', line 74

def self.add_updated_by_field(type = :string, &block)
  if block_given?
    @add_updated_by_field = true
    @updated_by_type = type
    @updated_by_proc = block
  end

  @add_updated_by_field
end

.create_by_defaultObject



46
47
48
# File 'lib/temporal_tables.rb', line 46

def self.create_by_default
  @create_by_default
end

.create_by_default=(default) ⇒ Object



50
51
52
# File 'lib/temporal_tables.rb', line 50

def self.create_by_default=(default)
  @create_by_default = default
end

.skip_temporal_table_for(*tables) ⇒ Object



55
56
57
# File 'lib/temporal_tables.rb', line 55

def self.skip_temporal_table_for(*tables)
  @skipped_temporal_tables += tables
end

.skipped_temporal_tablesObject



59
60
61
# File 'lib/temporal_tables.rb', line 59

def self.skipped_temporal_tables
  @skipped_temporal_tables.dup
end

.updated_by_procObject



70
71
72
# File 'lib/temporal_tables.rb', line 70

def self.updated_by_proc
  @updated_by_proc
end

.updated_by_typeObject



66
67
68
# File 'lib/temporal_tables.rb', line 66

def self.updated_by_type
  @updated_by_type
end