Class: SQLSearch::Atoms::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/sql_search_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Column

Returns a new instance of Column.



118
119
120
121
122
# File 'lib/sql_search_parser.rb', line 118

def initialize options
  @name = options[:name]
  @table = options[:table]
  @space = options[:space]
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



116
117
118
# File 'lib/sql_search_parser.rb', line 116

def name
  @name
end

#spaceObject (readonly)

Returns the value of attribute space.



116
117
118
# File 'lib/sql_search_parser.rb', line 116

def space
  @space
end

#tableObject (readonly)

Returns the value of attribute table.



116
117
118
# File 'lib/sql_search_parser.rb', line 116

def table
  @table
end

Instance Method Details

#to_sObject



124
125
126
# File 'lib/sql_search_parser.rb', line 124

def to_s
  [space,table,name].compact.map { |a| "`#{a}`" }.join('.')
end