I've still had to hack the mysql_adapter to set a flag upon opening
the MySQL database connection in order to be able to use SPs:
module ActiveRecord
class Base
def self.mysql_connection(config)
...
# last line of method - add 65536 flag
ConnectionAdapters::MysqlAdapter.new(mysql, logger, [host,
username, password, database, port, socket, 65536], config)
end
end
end
This has worked for me, and I have not read about a fix in 2.x to
handle this.
On Aug 24, 10:15 am, Chris Dekker <[email protected]>
wrote:
> Search yielded only ancients results with a lot of dead links that didnt
> help me any further.
>
> In the past it has been a pretty big issue to incorperate stored
> procedures into Rails. By now, has 2.3.2 in 2009 made any changes to
> this?
>
> How would one go about in 2.3.2 to call a stored procedure and work with
> its result set? (Be it a genuine object, or a hash)
>
> Model.connection.execute "CALL storedProc()"
> Above line will give the error that it cant return results for the given
> context.
>
> My stored proc returns column values from several models and some
> dynamicly calculated columns not found in any model.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---