Method: ROM::SQL::Schema#call

Defined in:
lib/rom/sql/schema.rb

#call(relation) ⇒ Relation

Create a new relation based on the schema definition

Parameters:

  • relation (Relation)

    The source relation

Returns:



94
95
96
# File 'lib/rom/sql/schema.rb', line 94

def call(relation)
  relation.new(relation.dataset.select(*self), schema: self)
end