Displaying 9 results from an estimated 9 matches for "oracleadapter".
Did you mean:
oracle_adapter
2007 Oct 08
1
How to get database adapter type programmatically in rails?
...database adapter type programmatically in my codes to process
different native SQL statements. I haven''t found any document for this
situation. After some research, I have found a way to do so like
following:
if ActiveRecord::Base::connection.is_a?
(ActiveRecord::ConnectionAdapters::OracleAdapter)
{Process native Oracle SQL statements}
else if ActiveRecord::Base::connection.is_a?
(ActiveRecord::ConnectionAdapters::MysqlAdapter)
{Process natvie Mysql SQL statements}
end
After test, it works. But I am wondering if this is the best way to
achieve my goal, or is there any...
2008 Jan 04
2
oracle adapter + activerecord sessions do not work
...e adapter wouldn''t work for me at
all until I found this patch code which provides the select_rows
method, seems they forgot to implement it or something:
require ''active_record/connection_adapters/oracle_adapter''
module ActiveRecord
module ConnectionAdapters
class OracleAdapter
def select_rows(sql, name = nil)
@connection.query_with_result = true
result = execute(sql, name)
rows = []
result.each { |row| rows << row }
result.free
rows
end
end
end
end
I placed that in environment.rb and it works best I...
2006 Jun 23
2
Rails and Oracle
I have a potential client who is interested in employing
my services to Web 2.0 their Web 1.0 perl+oracle app.
I''ve only used rails with MySql so far.
Are their any gotchas I should be aware of?
Guy
2006 Jul 07
1
Rails AR/Oracle Unit Test: [4578] failed (but getting better)
"bitsweat" has given AR/Oracle some love, but it''s still unhappy...
http://dev.rubyonrails.org/changeset/4578
------------------------------------------------------------------------
r4578 | bitsweat | 2006-07-07 10:34:45 -0700 (Fri, 07 Jul 2006) | 1 line
find_one uses find_every.first instead of find_initial since its primary key constraint obviates find_initial''s
2008 Jul 04
1
datatype problem when using ActiveRecord with Oracle
...either FalseClass or TrueClass. I tried to find
the source of the problem and I found oracle_adapter.rb (http://
www.koders.com/ruby/fidAF6400E299159A198A4064173CF305C895FCA945.aspx?s=%22Michael+Schoen%22#L5)
has a method ''simplified_field'' that has a line
"return :boolean if OracleAdapter.emulate_booleans && field_type ==
''NUMBER(1)''".
I tried overriding this method on my environment.rb and commented out
this line. This problem is solved but I have another field of type
''Interval'' which has to get mapped to String, but instead gets ma...
2008 Dec 05
1
ActiveRecord Oracle and nvarchar2 or nclob datatype
Hi,
I ve got oracle database which exists prior to my rails app... :-(
I ve got trouble when I am updating/inserting records of a table which
includes nvarchar2 attributes.
These have a specific maximum length.
I often get an error Value too long for column when doing my inserts/
updates, but in fact that is not the case.
I ve taken a look at the generated sql statements....
As far as I know
2006 Jul 09
6
Float -> BigDecimal
So, I''m personally cool with this change (patch from #5454, applied in
[4596]), and I''ll make it work for Oracle tomorrow.
But just wondering if folks considered the performance impact of the
change? From a simple test it seems that BigDecimal math is about twice
as slow as using Floats.
2006 Mar 28
4
Problem with ActiveRecord, create, save, and Oracle adapter?
Hi all,
Ruby 1.8.4
Rails 1.1
OCI8 0.1.14
I think I''m hitting an issue with ActiveRecord::Base#save and the Oracle
adapter. Line 158 in the schedules_controller.rb file is simply:
158: if @schedule.save
159: flash[:notice] = ''Schedule was successfully created.''
160: redirect_to :action => ''list''
161: else
162: render :action =>
2007 Aug 03
2
my number column returns boolean values
Hi everyone,
I''m working on a new rails project and have to build it on top of a
legacy oracle database. I''m trying to figure out how to get the
number value from a NUMBER(1) datatype. So far I''m only getting a
"true" value for 1 and "false" for any other number. From the console
I can print out my object values and can see that there are number