Module: ROM::SQL::AttributeWrapping Private
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#wrapped(name = source.dataset) ⇒ Attribute
Return attribute type wrapped for the specified relation name.
-
#wrapped? ⇒ Boolean
Return if the attribute type is from a wrapped relation.
Instance Method Details
#wrapped(name = source.dataset) ⇒ Attribute
Return attribute type wrapped for the specified relation name
25 26 27 |
# File 'lib/rom/sql/attribute_wrapping.rb', line 25 def wrapped(name = source.dataset) (wrapped: name).prefixed(name) end |
#wrapped? ⇒ Boolean
Return if the attribute type is from a wrapped relation
Wrapped attributes are used when two schemas from different relations are merged together. This way we can identify them easily and handle correctly in places like auto-mapping.
14 15 16 |
# File 'lib/rom/sql/attribute_wrapping.rb', line 14 def wrapped? ![:wrapped].nil? end |