Class: Journaled::Change

Inherits:
Object
  • Object
show all
Includes:
Event
Defined in:
app/models/journaled/change.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Event

#created_at, #event_type, #id, #journal!, #journaled_attributes, #journaled_partition_key, #journaled_schema_name, #tagged?

Constructor Details

#initialize(table_name:, record_id:, database_operation:, logical_operation:, changes:, journaled_stream_name:, journaled_enqueue_opts:, actor:) ⇒ Change

Returns a new instance of Change.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'app/models/journaled/change.rb', line 22

def initialize(table_name:,
               record_id:,
               database_operation:,
               logical_operation:,
               changes:,
               journaled_stream_name:,
               journaled_enqueue_opts:,
               actor:)
  @table_name = table_name
  @record_id = record_id
  @database_operation = database_operation
  @logical_operation = logical_operation
  @changes = changes
  @journaled_stream_name = journaled_stream_name
  @journaled_enqueue_opts = journaled_enqueue_opts
  @actor = actor
end

Instance Attribute Details

#actorObject (readonly)

Returns the value of attribute actor.



6
7
8
# File 'app/models/journaled/change.rb', line 6

def actor
  @actor
end

#changesObject (readonly)

Returns the value of attribute changes.



6
7
8
# File 'app/models/journaled/change.rb', line 6

def changes
  @changes
end

#database_operationObject (readonly)

Returns the value of attribute database_operation.



6
7
8
# File 'app/models/journaled/change.rb', line 6

def database_operation
  @database_operation
end

#journaled_enqueue_optsObject (readonly)

Returns the value of attribute journaled_enqueue_opts.



6
7
8
# File 'app/models/journaled/change.rb', line 6

def journaled_enqueue_opts
  @journaled_enqueue_opts
end

#journaled_stream_nameObject (readonly)

Returns the value of attribute journaled_stream_name.



6
7
8
# File 'app/models/journaled/change.rb', line 6

def journaled_stream_name
  @journaled_stream_name
end

#logical_operationObject (readonly)

Returns the value of attribute logical_operation.



6
7
8
# File 'app/models/journaled/change.rb', line 6

def logical_operation
  @logical_operation
end

#record_idObject (readonly)

Returns the value of attribute record_id.



6
7
8
# File 'app/models/journaled/change.rb', line 6

def record_id
  @record_id
end

#table_nameObject (readonly)

Returns the value of attribute table_name.



6
7
8
# File 'app/models/journaled/change.rb', line 6

def table_name
  @table_name
end