Module Sequel::Oracle::DatabaseMethods
In: lib/sequel/adapters/shared/oracle.rb

Methods

Constants

TEMPORARY = 'GLOBAL TEMPORARY '.freeze
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
TRANSACTION_ISOLATION_LEVELS = {:uncommitted=>'READ COMMITTED'.freeze, :committed=>'READ COMMITTED'.freeze, :repeatable=>'SERIALIZABLE'.freeze, :serializable=>'SERIALIZABLE'.freeze}

Attributes

autosequence  [RW] 

Public Instance methods

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 13
13:       def create_sequence(name, opts=OPTS)
14:         self << create_sequence_sql(name, opts)
15:       end

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 17
17:       def create_trigger(*args)
18:         self << create_trigger_sql(*args)
19:       end

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 21
21:       def current_user
22:         @current_user ||= metadata_dataset.get{sys_context('USERENV', 'CURRENT_USER')}
23:       end

Oracle uses the :oracle database type

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 30
30:       def database_type
31:         :oracle
32:       end

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 25
25:       def drop_sequence(name)
26:         self << drop_sequence_sql(name)
27:       end

Oracle namespaces indexes per table.

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 35
35:       def global_index_namespace?
36:         false
37:       end

Oracle supports deferrable constraints.

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 55
55:       def supports_deferrable_constraints?
56:         true
57:       end

DB2 supports transaction isolation levels.

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 60
60:       def supports_transaction_isolation_levels?
61:         true
62:       end

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 39
39:       def tables(opts=OPTS)
40:         m = output_identifier_meth
41:         metadata_dataset.from(:tab).server(opts[:server]).select(:tname).filter(:tabtype => 'TABLE').map{|r| m.call(r[:tname])}
42:       end

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 49
49:       def view_exists?(name) 
50:         m = input_identifier_meth
51:         metadata_dataset.from(:tab).filter(:tname =>m.call(name), :tabtype => 'VIEW').count > 0 
52:       end

[Source]

    # File lib/sequel/adapters/shared/oracle.rb, line 44
44:       def views(opts=OPTS) 
45:         m = output_identifier_meth
46:         metadata_dataset.from(:tab).server(opts[:server]).select(:tname).filter(:tabtype => 'VIEW').map{|r| m.call(r[:tname])}
47:       end

[Validate]