Sha256: 610dccd443ff6134afad65251aeb03235ab536703b44d38b6f65abd889e73523
Contents?: true
Size: 662 Bytes
Versions: 1
Compression:
Stored size: 662 Bytes
Contents
# encoding: utf-8 module Piglet module Relation class Cross # :nodoc: include Relation def initialize(relations, interpreter, options={}) options ||= {} @sources, @interpreter, @parallel = relations, interpreter, options[:parallel] end def schema schemas = @sources.map { |s| s.schema } schemas.first.union(schemas[1..-1]) end def to_s str = "CROSS #{source_aliases.join(', ')}" str << " PARALLEL #{@parallel}" if @parallel str end private def source_aliases @sources.map { |s| s.alias } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
piglet-0.3.0 | lib/piglet/relation/cross.rb |