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/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, TemporalClass, Whodunnit Classes: Railtie

Constant Summary collapse

VERSION =
'3.0.1'
END_OF_TIME =
'9999-12-31'
ONE_MICROSECOND =
0.000001.seconds

Class Method Summary collapse

Class Method Details

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



69
70
71
72
73
74
75
76
77
# File 'lib/temporal_tables.rb', line 69

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



41
42
43
# File 'lib/temporal_tables.rb', line 41

def self.create_by_default
  @create_by_default
end

.create_by_default=(default) ⇒ Object



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

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

.skip_temporal_table_for(*tables) ⇒ Object



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

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

.skipped_temporal_tablesObject



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

def self.skipped_temporal_tables
  @skipped_temporal_tables.dup
end

.updated_by_procObject



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

def self.updated_by_proc
  @updated_by_proc
end

.updated_by_typeObject



61
62
63
# File 'lib/temporal_tables.rb', line 61

def self.updated_by_type
  @updated_by_type
end