Class: Dynamoid::TransactionWrite::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/dynamoid/transaction_write/base.rb

Instance Method Summary collapse

Instance Method Details

#aborted?Boolean

Whether some callback aborted or canceled an action

Returns:

  • (Boolean)


26
27
28
# File 'lib/dynamoid/transaction_write/base.rb', line 26

def aborted?
  raise 'Not implemented'
end

#action_requestObject

Coresponding part of a final request body



42
43
44
# File 'lib/dynamoid/transaction_write/base.rb', line 42

def action_request
  raise 'Not implemented'
end

#observable_by_user_resultObject

Value returned to a user as an action result



37
38
39
# File 'lib/dynamoid/transaction_write/base.rb', line 37

def observable_by_user_result
  raise 'Not implemented'
end

#on_commitObject

Callback called after changes are persisted. It’s a proper place to mark changes in a model as applied.



15
16
17
# File 'lib/dynamoid/transaction_write/base.rb', line 15

def on_commit
  raise 'Not implemented'
end

#on_registrationObject

Callback called at “initialization” or “registration” an action before changes are persisted. It’s a proper place to validate a model or run callbacks



9
10
11
# File 'lib/dynamoid/transaction_write/base.rb', line 9

def on_registration
  raise 'Not implemented'
end

#on_rollbackObject

Callback called when a transaction is rolled back. It’s a proper place to undo changes made in after_… callbacks.



21
22
23
# File 'lib/dynamoid/transaction_write/base.rb', line 21

def on_rollback
  raise 'Not implemented'
end

#skipped?Boolean

Whether there are changes to persist, e.g. updating a model with no attribute changed is skipped.

Returns:

  • (Boolean)


32
33
34
# File 'lib/dynamoid/transaction_write/base.rb', line 32

def skipped?
  raise 'Not implemented'
end