Module: Rubernate::Callbacks::Runtime

Defined in:
lib/rubernate/callbacks.rb

Overview

This module contains callback method and included in class Rubernate::Runtime.

Instance Method Summary collapse

Instance Method Details

#after_commitObject

It’s invoked if transaction has just been commited.



53
54
# File 'lib/rubernate/callbacks.rb', line 53

def after_commit
end

#after_flushObject

It’s invoked if after flushing modified objects.



62
63
# File 'lib/rubernate/callbacks.rb', line 62

def after_flush 
end

#before_commitObject

It’s invoked if session/transaction is about to be commited.



49
50
# File 'lib/rubernate/callbacks.rb', line 49

def before_commit
end

#before_flush(modified) ⇒ Object

It’s invoked when Rubernate needs to flush modified objects. It happens when find_by_query is called or if session is going to be commited.



58
59
# File 'lib/rubernate/callbacks.rb', line 58

def before_flush modified
end

#on_beginObject

It’s invoked on session creation.



41
42
# File 'lib/rubernate/callbacks.rb', line 41

def on_begin
end

#on_rollbackObject

It’s invoked if session/transaction is about to be rolled back.



45
46
# File 'lib/rubernate/callbacks.rb', line 45

def on_rollback
end