I''m in an Oracle shop, and it''s the 1 thing that gets on my bosses nerves. I wish they would support this. Anyone any idea if or when it will be supported? Thanks Chris -- Posted via http://www.ruby-forum.com/.
Dr Nic
2006-Aug-08 11:09 UTC
[Rails] Re: When will rails support true prepared statements?
Chris wrote:> I''m in an Oracle shop, and it''s the 1 thing that gets on my bosses > nerves. I wish they would support this.What is a "prepared statment"? -- Posted via http://www.ruby-forum.com/.
OK, ill rephrase it. When will Rails support bind variables with Oracle? "find("name = ?",var)" is not using bind variables. Without bind variables oracle has to to more processing on every piece of SQL -- Posted via http://www.ruby-forum.com/.
Chris McGrath
2006-Aug-08 11:25 UTC
[Rails] Re: When will rails support true prepared statements?
On 8 Aug 2006, at 12:21, Chris wrote:> OK, ill rephrase it. When will Rails support bind variables with > Oracle? > > "find("name = ?",var)" is not using bind variables. > > Without bind variables oracle has to to more processing on every piece > of SQLThis has been discussed on the rails-core list. Have a look through the archives there. I''m pretty sure somethings cooking, no idea what state it''s at though. Chris
Dr Nic
2006-Aug-08 11:38 UTC
[Rails] Re: When will rails support true prepared statements?
Chris wrote:> OK, ill rephrase it. When will Rails support bind variables with > Oracle? > > "find("name = ?",var)" is not using bind variables. > > Without bind variables oracle has to to more processing on every piece > of SQLI highly encourage you to start an OracleActiveRecords gem that extends the API of ActiveRecords towards the feature set of Oracle. Rails/ActiveRecords will always support the lowest-common denominator of features provided by the supported databases. e.g. no foreign key support, only implicit keys via column names. No transactions for migrations. Once you have your own extension, you are friend to improve the CRUD API with bind calls, transactions for migrations, etc. Might be good branding for your boss too if your company/department sponsors the development. Cheers Nic -- Posted via http://www.ruby-forum.com/.
Dr Nic
2006-Aug-08 11:41 UTC
[Rails] Re: When will rails support true prepared statements?
This guy is doing Oracle AR work, perhaps chat with him: http://www.ruby-forum.com/topic/76352#new -- Posted via http://www.ruby-forum.com/.
Michael A. Schoen
2006-Aug-08 17:16 UTC
[Rails] When will rails support true prepared statements?
Chris wrote:> I''m in an Oracle shop, and it''s the 1 thing that gets on my bosses > nerves. I wish they would support this. > > Anyone any idea if or when it will be supported?Prepared statements don''t really matter so much, what''s big is the use of native bind variables. Which I''m working on (insert/update are complete), hope to have a patch ready within a week or so.
Pat Maddox
2006-Aug-08 23:52 UTC
[Rails] When will rails support true prepared statements?
On 8/8/06, Chris <cadams1342@hotmail.com> wrote:> I''m in an Oracle shop, and it''s the 1 thing that gets on my bosses > nerves. I wish they would support this. > > Anyone any idea if or when it will be supported? > > Thanks > Chris > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >As I understand it, the answer to questions like these is, "When you write a plugin for it."
Isak Hansen
2006-Aug-09 20:02 UTC
[Rails] When will rails support true prepared statements?
On 8/8/06, Michael A. Schoen <schoenm@earthlink.net> wrote:> Chris wrote: > > I''m in an Oracle shop, and it''s the 1 thing that gets on my bosses > > nerves. I wish they would support this. > > > > Anyone any idea if or when it will be supported? > > Prepared statements don''t really matter so much, what''s big is the use > of native bind variables. Which I''m working on (insert/update are > complete), hope to have a patch ready within a week or so.Sweet. You''re rewriting AR to pass around ["query string ? ? ?", bunch, of, params], as discussed on rails-core? But aren''t prepared statements and bind variables two aspects of the same thing? Isak
Michael A. Schoen
2006-Aug-10 00:23 UTC
[Rails] When will rails support true prepared statements?
Isak Hansen wrote:>> Prepared statements don''t really matter so much, what''s big is the use >> of native bind variables. Which I''m working on (insert/update are >> complete), hope to have a patch ready within a week or so. > > Sweet. You''re rewriting AR to pass around ["query string ? ? ?", > bunch, of, params], as discussed on rails-core?Roughly, yes.> But aren''t prepared statements and bind variables two aspects of the > same thing?Yes, and some dbs may use the terms interchangeably. For Oracle apps at least, "prepared statements" refers to a client-side structure for a sql statement, and use of such saves some time on the client. Not planning on that for ActiveRecord -- it will still dynamically create every sql statement. But it will support and use bind variables where possible.
> Prepared statements don''t really matter so much, what''s big is the use > of native bind variables. Which I''m working on (insert/update are > complete), hope to have a patch ready within a week or so.Will this be a rails core patch?? Where will I be able to access it? Thanks Chris -- Posted via http://www.ruby-forum.com/.
Michael A. Schoen
2006-Aug-10 17:07 UTC
[Rails] Re: When will rails support true prepared statements?
Chris wrote:>> Prepared statements don''t really matter so much, what''s big is the use >> of native bind variables. Which I''m working on (insert/update are >> complete), hope to have a patch ready within a week or so. > > Will this be a rails core patch?? Where will I be able to access it?My goal is to get this into rails core, though that''ll require some review from the core team. Not sure when it''ll happen -- in particular, don''t know if it''ll make it into the upcoming 1.2, the exact timing of which I''m unsure.