lib/sql_tree/node/field.rb in sql_tree-0.0.1 vs lib/sql_tree/node/field.rb in sql_tree-0.0.2

- old
+ new

@@ -2,10 +2,13 @@ class Field < Base attr_accessor :name, :table + alias :field :name + alias :field= :name= + def initialize(name, table = nil) @name = name @table = table end @@ -14,13 +17,9 @@ super(name) end def to_sql @table.nil? ? quote_var(@name) : quote_var(@table) + '.' + quote_var(@name) - end - - def to_tree - to_sql.to_sym end def ==(other) other.name == self.name && other.table == self.table end