Class: SQLColumn

Inherits:
SQLObject show all
Defined in:
lib/sqlobject.rb

Overview

Class representing SQL columns

Instance Attribute Summary

Attributes inherited from SQLObject

#alias, #inline, #name, #separator

Instance Method Summary collapse

Methods inherited from SQLObject

#_name, #_string, #_string=, get

Constructor Details

#initialize(col = nil) ⇒ SQLColumn



103
104
105
# File 'lib/sqlobject.rb', line 103

def initialize ( col = nil )
    @name = col.is_a?( SQLColumn )  ?  col.name  :  col #_prepareName( col )
end

Instance Method Details

#to_sObject



108
109
110
# File 'lib/sqlobject.rb', line 108

def to_s
    @name.to_s
end