module ROM::SQL::AttributeWrapping

@api private

Public Instance Methods

wrapped(name = source.dataset) click to toggle source

Return attribute type wrapped for the specified relation name

@param [Symbol] name The name of the source relation (defaults to source.dataset)

@return [Attribute]

@api public

# File lib/rom/sql/attribute_wrapping.rb, line 25
def wrapped(name = source.dataset)
  meta(wrapped: name).prefixed(name)
end
wrapped?() click to toggle source

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.

@api public

# File lib/rom/sql/attribute_wrapping.rb, line 14
def wrapped?
  !meta[:wrapped].nil?
end