module Sequel::Oracle::DatabaseMethods

  1. lib/sequel/adapters/shared/oracle.rb
Parent: Oracle

Constants

AUTOINCREMENT = ''.freeze  
DATABASE_ERROR_REGEXPS = { /unique constraint .+ violated/ => UniqueConstraintViolation, /integrity constraint .+ violated/ => ForeignKeyConstraintViolation, /check constraint .+ violated/ => CheckConstraintViolation, /cannot insert NULL into|cannot update .+ to NULL/ => NotNullConstraintViolation, /can't serialize access for this transaction/ => SerializationFailure, }.freeze  
TEMPORARY = 'GLOBAL TEMPORARY '.freeze  
TRANSACTION_ISOLATION_LEVELS = {:uncommitted=>'READ COMMITTED'.freeze, :committed=>'READ COMMITTED'.freeze, :repeatable=>'SERIALIZABLE'.freeze, :serializable=>'SERIALIZABLE'.freeze}  

Attributes

Public Instance methods

create_sequence (name, opts={})
[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 11
def create_sequence(name, opts={})
  self << create_sequence_sql(name, opts)
end
create_trigger (*args)
[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 15
def create_trigger(*args)
  self << create_trigger_sql(*args)
end
current_user ()
[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 19
def current_user
  @current_user ||= metadata_dataset.get{sys_context('USERENV', 'CURRENT_USER')}
end
database_type ()

Oracle uses the :oracle database type

[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 28
def database_type
  :oracle
end
drop_sequence (name)
[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 23
def drop_sequence(name)
  self << drop_sequence_sql(name)
end
global_index_namespace? ()

Oracle namespaces indexes per table.

[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 33
def global_index_namespace?
  false
end
supports_deferrable_constraints? ()

Oracle supports deferrable constraints.

[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 53
def supports_deferrable_constraints?
  true
end
supports_transaction_isolation_levels? ()

DB2 supports transaction isolation levels.

[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 58
def supports_transaction_isolation_levels?
  true
end
tables (opts={})
[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 37
def tables(opts={})
  m = output_identifier_meth
  metadata_dataset.from(:tab).server(opts[:server]).select(:tname).filter(:tabtype => 'TABLE').map{|r| m.call(r[:tname])}
end
view_exists? (name)
[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 47
def view_exists?(name) 
  m = input_identifier_meth
  metadata_dataset.from(:tab).filter(:tname =>m.call(name), :tabtype => 'VIEW').count > 0 
end
views (opts={})
[show source]
# File lib/sequel/adapters/shared/oracle.rb, line 42
def views(opts={}) 
  m = output_identifier_meth
  metadata_dataset.from(:tab).server(opts[:server]).select(:tname).filter(:tabtype => 'VIEW').map{|r| m.call(r[:tname])}
end