module Sequel::JDBC::Oracle::DatabaseMethods

def self.extended(db)

def self.extended(db)
  db.instance_eval do
    @autosequence = opts[:autosequence]
    @primary_key_sequences = {}
  end
end

def last_insert_id(conn, opts)

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_yield(sql){stmt.executeQuery(sql)}
        rs.next
        rs.getInt(1)
      rescue java.sql.SQLException
        nil
      end
    end
  end
end

def primary_key_index_re

Primary key indexes appear to start with sys_ on Oracle
def primary_key_index_re
  PRIMARY_KEY_INDEX_RE
end

def schema_parse_table(*)

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

def schema_parse_table_skip?(h, schema)

def schema_parse_table_skip?(h, schema)
  super || (h[:table_schem] != current_user unless schema)
end

def supports_releasing_savepoints?

As of Oracle 9.2, releasing savepoints is no longer supported.
def supports_releasing_savepoints?
  false
end