Class: ActiveRecord::ConnectionAdapters::OciAdapter

Inherits:
AbstractAdapter show all
Defined in:
lib/empty_eye/active_record/connection_adapters/oci_adapter.rb

Instance Method Summary collapse

Methods inherited from AbstractAdapter

#ordinary_table_exists?, #view_exists?

Instance Method Details

#tables(name = nil) ⇒ Object

:nodoc:



5
6
7
# File 'lib/empty_eye/active_record/connection_adapters/oci_adapter.rb', line 5

def tables(name = nil) #:nodoc:
  tables_without_views(name) | views(name)
end

#tables_without_views(name = nil) ⇒ Object

:nodoc:



9
10
11
12
13
# File 'lib/empty_eye/active_record/connection_adapters/oci_adapter.rb', line 9

def tables_without_views(name = nil) #:nodoc:
  tables = []
  execute("SELECT TABLE_NAME FROM USER_TABLES", name).each { |row| tables << row[0]  }
  tables
end

#views(name = nil) ⇒ Object

:nodoc:



15
16
17
18
19
# File 'lib/empty_eye/active_record/connection_adapters/oci_adapter.rb', line 15

def views(name = nil) #:nodoc:
  views = []
  execute("SELECT VIEW_NAME FROM USER_VIEWS", name).each { |row| views << row[0] }
  views
end