Class: Arel::Visitors::ToSql

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

Instance Method Summary collapse

Instance Method Details

#visit_Arel_Nodes_Copy(o) ⇒ Object



87
88
89
# File 'lib/monkeypatch_arel.rb', line 87

def visit_Arel_Nodes_Copy o
  "COPY #{o.statement} FROM #{visit o.from}"
end

#visit_Arel_Nodes_CopyStatement(o) ⇒ Object



83
84
85
# File 'lib/monkeypatch_arel.rb', line 83

def visit_Arel_Nodes_CopyStatement o
  "#{visit o.relation} #{o.options}"
end

#visit_Arel_Nodes_Relation(o) ⇒ Object



91
92
93
# File 'lib/monkeypatch_arel.rb', line 91

def visit_Arel_Nodes_Relation o
  visit o.expr.to_sql
end

#visit_Arel_Nodes_Unload(o) ⇒ Object



79
80
81
# File 'lib/monkeypatch_arel.rb', line 79

def visit_Arel_Nodes_Unload o
  "UNLOAD (#{visit o.statement}) TO #{visit o.to}"
end

#visit_Arel_Nodes_UnloadStatement(o) ⇒ Object



75
76
77
# File 'lib/monkeypatch_arel.rb', line 75

def visit_Arel_Nodes_UnloadStatement o
  "#{visit o.relation} #{o.options}"
end