Class: ViewModel::DeserializeContext::SharedContext

Inherits:
TraversalContext::SharedContext show all
Defined in:
lib/view_model/deserialize_context.rb

Instance Attribute Summary

Attributes inherited from TraversalContext::SharedContext

#access_control, #callbacks

Instance Method Summary collapse

Constructor Details

#initialize(validate_deferred_constraints: true, **rest) ⇒ SharedContext

Returns a new instance of SharedContext.



7
8
9
10
# File 'lib/view_model/deserialize_context.rb', line 7

def initialize(validate_deferred_constraints: true, **rest)
  super(**rest)
  @validate_deferred_constraints = validate_deferred_constraints
end

Instance Method Details

#validate_deferred_constraints?Boolean

Should deferred database constraints be checked via SET CONSTRAINTS IMMEDIATE at the end of the deserialization operation

Returns:

  • (Boolean)


14
15
16
# File 'lib/view_model/deserialize_context.rb', line 14

def validate_deferred_constraints?
  @validate_deferred_constraints
end