adapters 'jdbcmysql' and 'mysql' return different object when calling method 
execute()
--------------------------------------------------------------------------------------

                 Key: JRUBY-3772
                 URL: http://jira.codehaus.org/browse/JRUBY-3772
             Project: JRuby
          Issue Type: Bug
         Environment: debian lenny
jruby 1.3.0
gems: jdbc-mysql (5.0.4), activerecord-jdbcmysql-adapter (0.9.1)
            Reporter: gonzalo suarez
            Assignee: Thomas E Enebo
            Priority: Minor


When using ActiveRecord with adapters 'mysql' and 'jdbcmysql' the execute() 
method of connection class returns different object.

So, for example, this code:

total = ActiveRecord::Base::connection.execute( 'select count(*) from 
history').fetch_row[0].to_i

only works with mysql adapter.

ActiveRecord::Base::connection.execute() should return a Mysql::Result object 
where fetch_row method is available. When jdbcmysql adapter is used, this 
method returns a Hash object where fetch_row method isn't defined. The 
behaviour of both adapters should be unified so same code may run with no 
modifications at all in both ruby and jruby.
 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to