Sha256: 1218adba06e0c87876b5802cfeaccbb02777ba690064f08f024ba4998386f40a
Contents?: true
Size: 729 Bytes
Versions: 1
Compression:
Stored size: 729 Bytes
Contents
# # Copyright (c) 2011, SoundCloud Ltd., Rany Keddo, Tobias Bielohlawek, Tobias # Schmidt # # Determine and format columns common to origin and destination. # module Lhm class Intersection def initialize(origin, destination) @origin = origin @destination = destination end def common (@origin.columns.keys & @destination.columns.keys).sort end def escaped common.map { |name| tick(name) } end def joined escaped.join(", ") end def typed(type) common.map { |name| qualified(name, type) }.join(", ") end private def qualified(name, type) "#{ type }.`#{ name }`" end def tick(name) "`#{ name }`" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lhm-1.0.0.rc2 | lib/lhm/intersection.rb |