class ROM::Relation::Wrap

Relation wrapping other relations

@api public

Public Instance Methods

call(*args) click to toggle source

Materialize a wrap

@see Relation#call

@return [Loaded]

@api public

# File lib/rom/relation/wrap.rb, line 30
def call(*args)
  if auto_map?
    Loaded.new(self, mapper.(relation.with(auto_map: false, auto_struct: false)))
  else
    Loaded.new(self, relation.(*args))
  end
end
relation() click to toggle source

Return an adapter-specific relation representing a wrap

@abstract

@api private

# File lib/rom/relation/wrap.rb, line 43
def relation
  raise NotImplementedError
end
wrap(*args) click to toggle source

Wrap more relations

@see Relation#wrap

@return [Wrap]

@api public

# File lib/rom/relation/wrap.rb, line 19
def wrap(*args)
  self.class.new(root, nodes + root.wrap(*args).nodes)
end
wrap?() click to toggle source

Return if this is a wrap relation

@return [true]

@api private

# File lib/rom/relation/wrap.rb, line 52
def wrap?
  true
end

Private Instance Methods

decorate?(other) click to toggle source

@api private

Calls superclass method ROM::Relation::Graph#decorate?
# File lib/rom/relation/wrap.rb, line 59
def decorate?(other)
  super || other.is_a?(Combined)
end