class Seaquel::AST::Column
Attributes
name[R]
table[R]
Public Class Methods
new(name, table=nil)
click to toggle source
# File lib/seaquel/ast/column.rb, line 9 def initialize name, table=nil @name = name @table = table end
Public Instance Methods
as_column_reference(quoter)
click to toggle source
Returns an SQL column reference, excluding table name.
# File lib/seaquel/ast/column.rb, line 42 def as_column_reference quoter quoter.column(name) end
as_full_reference(quoter)
click to toggle source
Returns an SQL column reference, including the table name.
# File lib/seaquel/ast/column.rb, line 28 def as_full_reference quoter parts = [] if table parts << table.as_column_prefix(quoter) end parts << as_column_reference(quoter) parts.join('.') end
inspect()
click to toggle source
# File lib/seaquel/ast/column.rb, line 46 def inspect if table lisp_inspect(:column, name, table) else lisp_inspect(:column, name) end end
to(value)
click to toggle source
Set the column to value.
# File lib/seaquel/ast/column.rb, line 16 def to value Assign.new(self, value) end
visit(visitor)
click to toggle source
Visits the column as part of sql generation.
# File lib/seaquel/ast/column.rb, line 22 def visit visitor visitor.visit_column self end