class Rusql::Table
Attributes
alias[R]
Public Instance Methods
[](ind)
click to toggle source
# File lib/rusql/table.rb, line 6 def [](ind) Column.new(self, ind) end
as(name)
click to toggle source
# File lib/rusql/table.rb, line 10 def as(name) raise TypeException.new(Symbol, name.class) unless name.is_a?(String) || name.is_a?(Symbol) @alias = name self end
to_s()
click to toggle source
# File lib/rusql/table.rb, line 18 def to_s if self.alias.nil? self.name else self.alias end end
to_s_for_aliasing()
click to toggle source
# File lib/rusql/table.rb, line 26 def to_s_for_aliasing if self.alias.nil? "#{self.name}" else "#{self.name} AS #{self.alias}" end end