Module: Sequel::Oracle::DatabaseMethods

Included in:
JDBC::Oracle::DatabaseMethods, Database
Defined in:
lib/sequel_core/adapters/shared/oracle.rb

Instance Method Summary collapse

Instance Method Details

#table_exists?(name) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/sequel_core/adapters/shared/oracle.rb', line 10

def table_exists?(name)
  from(:tab).filter(:tname => name.to_s.upcase, :tabtype => 'TABLE').count > 0
end

#tablesObject



4
5
6
7
8
# File 'lib/sequel_core/adapters/shared/oracle.rb', line 4

def tables
  from(:tab).select(:tname).filter(:tabtype => 'TABLE').map do |r|
    r[:tname].downcase.to_sym
  end
end