Methods

Included Modules

Class Index [+]

Quicksearch

Sequel::Oracle::Database

Constants

CONNECTION_ERROR_CODES

ORA-00028: your session has been killed ORA-01012: not logged on ORA-03113: end-of-file on communication channel ORA-03114: not connected to ORACLE

ORACLE_TYPES

Attributes

conversion_procs[R]

Hash of conversion procs for this database.

Public Class Methods

new(opts={}) click to toggle source
    # File lib/sequel/adapters/oracle.rb, line 21
21:       def initialize(opts={})
22:         super
23:         @autosequence = opts[:autosequence]
24:         @primary_key_sequences = {}
25:         @conversion_procs = ORACLE_TYPES.dup
26:       end

Public Instance Methods

connect(server) click to toggle source
    # File lib/sequel/adapters/oracle.rb, line 28
28:       def connect(server)
29:         opts = server_opts(server)
30:         if opts[:database]
31:           dbname = opts[:host] ?              "//#{opts[:host]}#{":#{opts[:port]}" if opts[:port]}/#{opts[:database]}" : opts[:database]
32:         else
33:           dbname = opts[:host]
34:         end
35:         conn = OCI8.new(opts[:user], opts[:password], dbname, opts[:privilege])
36:         conn.prefetch_rows = typecast_value_integer(opts[:prefetch_rows]) if opts[:prefetch_rows]
37:         conn.autocommit = true
38:         conn.non_blocking = true
39:         
40:         # The ruby-oci8 gem which retrieves oracle columns with a type of
41:         # DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE is complex based on the
42:         # ruby version (1.9.2 or later) and Oracle version (9 or later)
43:         # In the now standard case of 1.9.2 and Oracle 9 or later, the timezone
44:         # is determined by the Oracle session timezone. Thus if the user
45:         # requests Sequel provide UTC timezone to the application,
46:         # we need to alter the session timezone to be UTC
47:         if Sequel.application_timezone == :utc
48:           conn.exec("ALTER SESSION SET TIME_ZONE='-00:00'")
49:         end
50:         
51:         class << conn
52:           attr_reader :prepared_statements
53:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.