Sha256: 5917f5127069cc1a3768d494a46117d372c0fe46194957fbadb0d108740c3a3c
Contents?: true
Size: 863 Bytes
Versions: 3
Compression:
Stored size: 863 Bytes
Contents
module RailsSqlViews4 module ConnectionAdapters module OciAdapter # Returns true as this adapter supports views. def supports_views? true end def base_tables(name = nil) #:nodoc: tables = [] execute("SELECT TABLE_NAME FROM USER_TABLES", name).each { |row| tables << row[0] } tables end alias nonview_tables base_tables def views(name = nil) #:nodoc: views = [] execute("SELECT VIEW_NAME FROM USER_VIEWS", name).each { |row| views << row[0] } views end # Get the view select statement for the specified table. def view_select_statement(view, name=nil) row = execute("SELECT TEXT FROM USER_VIEWS WHERE VIEW_NAME = '#{view}'", name).each do |row| return row[0] end raise "No view called #{view} found" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems