Class: ROM::SQL::Wrap

Inherits:
Relation::Wrap
  • Object
show all
Defined in:
lib/rom/sql/wrap.rb

Overview

Specialized wrap relation for SQL

This type of relations is returned when using Relation#wrap and it uses a join, unlike Relation#combine which makes separate queries. This means a relation is restricted only to tuples which have associated tuples, so it should be used in cases where you want to rely on this restriction.

Instance Method Summary collapse

Instance Method Details

#schemaSchema

Return a schema which includes attributes from wrapped relations

Returns:



22
23
24
# File 'lib/rom/sql/wrap.rb', line 22

def schema
  root.schema.merge(nodes.map(&:schema).reduce(:merge)).qualified
end