Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10415 (new defect)

Opened 2 years ago

Last modified 1 year ago

oracle adapter raise an 'select_rows is an abstract method'

Reported by: dbourguignon Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords:
Cc:

Description

in 2.0.1 With Oracle adapter the "rake test" raise an 'select_rows is an abstract method'

the gem activerecord-oracle-adapter (1.0.0) is installed test in 1.2.6 is ok

tested with cygwin on windows

Attachments

oracle_adapter_with_local_changes_for_2.0 (4.4 kB) - added by rshell on 12/18/07 08:59:04.
Minor changes to 2.0

Change History

(follow-up: ↓ 2 ) 12/07/07 21:24:36 changed by dbourguignon

I investigated that a bit, it seems that oracle_adapter.rb does not implement the select_rows method.

I looked at postgresql._adapter.rb and sqlserver_adapter.rb and both implement it.

I guess this is the problem. It is the same for insert, update, ... The svn log doesn't show anything about that.

I wonder how it was working up to the 1.2.6.

(in reply to: ↑ 1 ) 12/14/07 20:17:01 changed by ianzabel

I'm running into the same issue. There's a workaround for it here:

http://www.ruby-forum.com/topic/127249#592152

12/18/07 08:59:04 changed by rshell

  • attachment oracle_adapter_with_local_changes_for_2.0 added.

Minor changes to 2.0

12/18/07 09:00:58 changed by rshell

Found the same problem on rake db:test:clone solved with the following minor change to oracle_adapter.rb code:-

      # Returns an array of arrays containing the field values.
      # Order is the same as that returned by #columns.
        def select_rows(sql, name = nil)
          result = select(sql, name)
          result.map{ |v| v.values}
        end

Also added to personally changes like use of BINARY_DECIMAL type for true float in oracle and CHAR(1) for boolean with support for (T/F Y/N and +/-) as used in a number of systems I have worked on.

03/19/08 23:28:51 changed by davidtar

One small problem with changing :float from NUMBER to BINARY_DECIMAL is that this new IEEE floating-point type was released in 10g.

I believe that :float should be change from NUMBER to FLOAT as the default Oracle precision for floats of 126 is invalid for NUMBER. This would also allow support for pre 10g databases.