# File lib/sequel/adapters/jdbc/oracle.rb, line 86 def primary_key_index_re /\Asys_/ end
# File lib/sequel/adapters/jdbc/oracle.rb, line 42 def self.extended(db) db.instance_exec do @autosequence = opts[:autosequence] @primary_key_sequences = {} end end
Oracle exception handling with SQLState is less accurate than with regexps.
# File lib/sequel/adapters/jdbc/oracle.rb, line 52 def database_exception_use_sqlstates? false end
Default the fetch size for statements to 100, similar to the oci8-based oracle adapter.
# File lib/sequel/adapters/jdbc/oracle.rb, line 61 def default_fetch_size 100 end
# File lib/sequel/adapters/jdbc/oracle.rb, line 56 def disconnect_error?(exception, opts) super || exception.message =~ /\AClosed Connection/ end
# File lib/sequel/adapters/jdbc/oracle.rb, line 65 def last_insert_id(conn, opts) unless sequence = opts[:sequence] if t = opts[:table] sequence = sequence_for_table(t) end end if sequence sql = "SELECT #{literal(sequence)}.currval FROM dual" statement(conn) do |stmt| begin rs = log_connection_yield(sql, conn){stmt.executeQuery(sql)} rs.next rs.getLong(1) rescue java.sql.SQLException nil end end end end
Primary key indexes appear to start with sys_ on Oracle
# File lib/sequel/adapters/jdbc/oracle.rb, line 86 def primary_key_index_re /\Asys_/ end
# File lib/sequel/adapters/jdbc/oracle.rb, line 90 def schema_parse_table(*) sch = super sch.each do |c, s| if s[:type] == :decimal && s[:scale] == -127 s[:type] = :integer elsif s[:db_type] == 'DATE' s[:type] = :datetime end end sch end
# File lib/sequel/adapters/jdbc/oracle.rb, line 102 def schema_parse_table_skip?(h, schema) super || (h[:table_schem] != current_user unless schema) end
# File lib/sequel/adapters/jdbc/oracle.rb, line 111 def setup_type_convertor_map super @type_convertor_map[:OracleDecimal] = Oracle.method(:OracleDecimal) @type_convertor_map[:OracleClob] = Oracle.method(:OracleClob) end
As of Oracle 9.2, releasing savepoints is no longer supported.
# File lib/sequel/adapters/jdbc/oracle.rb, line 107 def supports_releasing_savepoints? false end