Class: ActiveRecord::ConnectionAdapters::OracleAdapter
- Inherits:
-
AbstractAdapter
- Object
- AbstractAdapter
- ActiveRecord::ConnectionAdapters::OracleAdapter
- Defined in:
- lib/empty_eye/active_record/connection_adapters/oracle_adapter.rb
Instance Method Summary collapse
-
#tables(name = nil) ⇒ Object
:nodoc:.
-
#tables_without_views(name = nil) ⇒ Object
:nodoc:.
- #views(name = nil) ⇒ Object
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/oracle_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/oracle_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
15 16 17 18 19 |
# File 'lib/empty_eye/active_record/connection_adapters/oracle_adapter.rb', line 15 def views(name = nil) views = [] execute("SELECT VIEW_NAME FROM USER_VIEWS", name).each { |row| views << row[0] } views end |