Module: Rein::View

Instance Method Summary collapse

Instance Method Details

#create_view(view_name, sql) ⇒ Object



3
4
5
6
# File 'lib/rein/view.rb', line 3

def create_view(view_name, sql)
  sql = "CREATE VIEW #{view_name} AS #{sql}"
  execute(sql)
end

#drop_view(view_name) ⇒ Object



8
9
10
11
# File 'lib/rein/view.rb', line 8

def drop_view(view_name)
  sql = "DROP VIEW #{view_name}"
  execute(sql)
end