<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ray_apps_blog &#187; oracle-enhanced</title>
	<atom:link href="http://blog.rayapps.com/category/oracle-enhanced/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rayapps.com</link>
	<description>About Ruby, Oracle, Mac and others</description>
	<lastBuildDate>Fri, 26 Feb 2010 16:43:11 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='blog.rayapps.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/0dbc428d172e04af3f6bb51ac225001b?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>ray_apps_blog &#187; oracle-enhanced</title>
		<link>http://blog.rayapps.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.rayapps.com/osd.xml" title="ray_apps_blog" />
	<atom:link rel='hub' href='http://blog.rayapps.com/?pushpress=hub'/>
		<item>
		<title>ActiveRecord Oracle enhanced adapter version 1.2.4</title>
		<link>http://blog.rayapps.com/2010/02/24/activerecord-oracle-enhanced-adapter-version-1-2-4/</link>
		<comments>http://blog.rayapps.com/2010/02/24/activerecord-oracle-enhanced-adapter-version-1-2-4/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 13:23:08 +0000</pubDate>
		<dc:creator>Raimonds Simanovskis</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle-enhanced]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayapps.wordpress.com/?p=160</guid>
		<description><![CDATA[I have released maintenance version of ActiveRecrod Oracle enhanced adapter with some bug fixes and some new features. This is the last maintenance version for Rails 2, I have already done majority of work to support also Rails 3 in next adapter versions, but that deserves another post when it will be ready :).
Detailed changes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=160&subd=rayapps&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I have released maintenance version of ActiveRecrod <a href="http://github.com/rsim/oracle-enhanced">Oracle enhanced adapter</a> with some bug fixes and some new features. This is the last maintenance version for Rails 2, I have already done majority of work to support also Rails 3 in next adapter versions, but that deserves another post when it will be ready :).</p>
<p>Detailed changes can be found in <a href="http://github.com/rsim/oracle-enhanced/blob/master/History.txt">change history file</a> and commit log, here I will point out the main changes.</p>
<h3>Schema and structure dump</h3>
<p>There are several improvements in schema (<strong>rake db:schema:dump</strong>) and structure dump (<strong>rake db:structure:dump</strong>) tasks. Now structure dump is improved to contain all schema objects in SQL statements format.</p>
<p>Also <strong>db:test:purge</strong> rake task (which is run before recreating test schema when running rake test or rake spec) is changed that it will delete all schema objects from test schema &#8211; including also views, packages, procedures and functions which are not recreated from schema.rb. So if you need to have additional database objects in your schema besides tables, indexes, sequences and synonyms (which are dumped in schema.rb) then you need to recreate them after standard rake task db:schema:load is run. Here is example how to execute any additional tasks after db:schema:load (include this in some .rake file in lib/tasks directory):</p>
<pre class="brush: ruby; light: true;">
namespace :db do
  namespace :schema do
    task :load do
      Rake::Task[&quot;db:schema:create_other_objects&quot;].invoke
    end
    task :create_other_objects do
      # include code here which creates necessary views, packages etc.
    end
  end
end
</pre>
<h3>Additional options for schema definition methods</h3>
<p>You can pass <strong>:temporary =&gt; true</strong> option for <strong>create_table</strong> method to create temporary tables.</p>
<p>You can use <strong>:tablespace =&gt; &#8220;tablespace name&#8221;</strong> option for <strong>add_index</strong> method to create index in non-default Oracle tablespace that is specified for user (e.g. if it is requested by your DBA for performance reasons). You can also define function based indexes using add_index and they will be correctly dumped in schema.rb.</p>
<h3>Savepoints and nested ActiveRecord transactions</h3>
<p>oracle_enhanced adapter now supports <a href="http://weblog.rubyonrails.org/2009/1/16/this-week-in-edge-rails">ActiveRecord nested transactions</a> using database savepoints.</p>
<h3>ruby-oci8 version</h3>
<p>As I am using and testing oracle_enhanced adapter just with <strong>ruby-oci8 2.0.3</strong> then I have made this as precondition (if you use MRI 1.8 or 1.9). So if you haven&#8217;t yet upgraded to latest ruby-oci8 version then please do so before upgrading to oracle_enhanced 1.2.4.</p>
<h3>JNDI connection support</h3>
<p>If you are using oracle_enhanced with JRuby then now you can also use JNDI database connections &#8211; please see this <a href="http://github.com/rsim/oracle-enhanced/issues#issue/6">issue with comments</a> to see some examples.</p>
<h3>Install</h3>
<p>As always you can install Oracle enhanced adapter on any Ruby platform (Ruby 1.8.6 / 1.8.7 or Ruby 1.9.1 or JRuby) with</p>
<pre class="brush: bash; light: true;">
gem install activerecord-oracle_enhanced-adapter
</pre>
<p>If you have any questions please use <a href="http://groups.google.com/group/oracle-enhanced">discussion group</a> or post comments here.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rayapps.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rayapps.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rayapps.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rayapps.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rayapps.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rayapps.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rayapps.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rayapps.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rayapps.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rayapps.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=160&subd=rayapps&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rayapps.com/2010/02/24/activerecord-oracle-enhanced-adapter-version-1-2-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a94fbe334eb75d80da9dd0d3d352df1b?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">elietas</media:title>
		</media:content>
	</item>
		<item>
		<title>New features in ActiveRecord Oracle enhanced adapter version 1.2.2</title>
		<link>http://blog.rayapps.com/2009/09/28/new-features-in-activerecord-oracle-enhanced-adapter-version-1-2-2/</link>
		<comments>http://blog.rayapps.com/2009/09/28/new-features-in-activerecord-oracle-enhanced-adapter-version-1-2-2/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 17:55:34 +0000</pubDate>
		<dc:creator>Raimonds Simanovskis</dc:creator>
				<category><![CDATA[jruby]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle-enhanced]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayapps.wordpress.com/?p=116</guid>
		<description><![CDATA[During the last months many new features have been implemented for ActiveRecord Oracle enhanced adapter which are now included in Oracle enhanced adapter version 1.2.2. You can find full list in change history file, here I will tell about the main ones.
Documentation
Now Oracle enhanced adapter has improved RDoc documentation for all public methods. So you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=116&subd=rayapps&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>During the last months many new features have been implemented for ActiveRecord <a href="http://github.com/rsim/oracle-enhanced">Oracle enhanced adapter</a> which are now included in Oracle enhanced adapter version 1.2.2. You can find full list in <a href="http://github.com/rsim/oracle-enhanced/blob/master/History.txt">change history file</a>, here I will tell about the main ones.</p>
<h3>Documentation</h3>
<p>Now Oracle enhanced adapter has improved RDoc documentation for all public methods. So you can go to RDoc documentation of installed gem or go and <a href="http://oracle-enhanced.rubyforge.org/rdoc">view published documentation on-line</a>.</p>
<h3>Schema definition</h3>
<p>There are many new features in schema definition methods that you can use in migration files:</p>
<ul>
<li>When you use <strong>add_index</strong> then ActiveRecord is automatically generating index name using format index_table_name_on_column1_and_column2_&#8230; which previously could cause Oracle errors as Oracle identifiers should be up to 30 characters long. Now default index names are <strong>automatically shortened down to 30 or less characters</strong> (of course you can always use also :name option to specify shortened version by yourself).</li>
<li>Now adapter is <strong>ignoring :limit option for :text and :binary columns</strong> (as in Oracle you cannot specify limit for CLOB and BLOB data types). Previously it could cause errors if you tried to migrate Rails application from e.g. MySQL where :text and :binary columns could have :limit in schema definition.</li>
<li>If you define <strong>:string column with :limit option</strong> then it will define <strong>VARCHAR2 column with size in characters and not in bytes</strong> (this makes difference if you use UTF-8 with language where one character might be stored as several bytes). This is expected behavior from ActiveRecord that you define maximum string size in UTF-8 characters.</li>
<li>Now you can use <strong>add_foreign_key</strong> and <strong>remove_foreign_key</strong> to define foreign key constraints in migrations (see <a href="http://oracle-enhanced.rubyforge.org/rdoc/classes/ActiveRecord/ConnectionAdapters/OracleEnhancedSchemaStatementsExt.html#M000010">RDoc documentation for details</a>). Syntax and some implemenatation for foreign key definition was taken from <a href="http://github.com/matthuhiggins/foreigner">foreigner Rails plugin</a> as well as some ideas taken from <a href="http://github.com/eyestreet/active_record_oracle_extensions">active_record_oracle_extensions plugin</a>.</li>
<li><strong>add_foreign_key</strong> definitions will be also <strong>extracted in schema.rb</strong> by <strong>rake db:schema:dump</strong> task. Therefore they will be also present in test database when you will recreate it from schema.rb file.</li>
<li>Foreign keys are also safe for loading of fixtures (in case you are still using them instead of factories :)). <strong>disable_referential_integrity</strong> method is implemented for Oracle enhanced adapter which is called by ActiveRecord before loading fixtures and which disables all currently active foreign key constraints during loading of fixtures.</li>
<li>You can use <strong>add_synonym</strong> and <strong>remove_synonym</strong> to <a href="http://oracle-enhanced.rubyforge.org/rdoc/classes/ActiveRecord/ConnectionAdapters/OracleEnhancedSchemaStatementsExt.html#M000012">define database synonyms</a> to other tables, views or sequences. add_synonym definitions will also be extracted in schema.rb file.</li>
<li>It is possible to create tables with <a href="http://oracle-enhanced.rubyforge.org/rdoc/classes/ActiveRecord/ConnectionAdapters/OracleEnhancedAdapter.html#M000032">primary key trigger</a>. There will be no difference in terms how you would create new records in such table using ActiveRecord but in case you have also need to do direct INSERTs into the table then it will be easier as you can omit primary key from INSERT statement and primary key trigger will populate it automatically from corresponding sequence.</li>
<li>ActiveRecord <strong>schema dumper is patched</strong> to work correctly when default <strong>table prefixes or suffixes</strong> are used &#8211; they are now removed from schema.rb dump to avoid duplicate prefixes and suffixes when recreating schema from schema.rb.</li>
</ul>
<h3>Legacy schema support</h3>
<p>Some features which can support &#8220;weird&#8221; legacy database schemas:</p>
<ul>
<li>If you are using ActiveRecord with legacy schema which have tables with triggers that populate primary key triggers (and not using default Rails and Oracle enhanced adapter conventions) then you can use <strong>set_sequence_name :autogenerated</strong> in class definition to tell adapter to omit primary key value from INSERTs.</li>
<li>You can use ActiveRecord also with <strong>tables that you can access over database link</strong>. To do that you need to define local synonym to remote table (and also remote sequence if you want to insert records as well) and then use local synonym in set_table_name in class definition. Previously adapter could not get remote table columns, now it will get table columns also over database link.<br />
But still you cannot specify remote table (like &#8220;table_name@db_link&#8221;) directly in set_table_name as table_name will be used as column prefix in generated SQL statements where &#8220;@db_link&#8221; will not be valid syntax.<br />
And when you define local synonyms then please use the new add_synonym feature :)</li>
</ul>
<h3>Connection options</h3>
<ul>
<li><strong>cursor_sharing</strong> option default value is changed from &#8220;similar&#8221; to &#8220;<strong>force</strong>&#8221; &#8211; please read <a href="http://groups.google.com/group/oracle-enhanced/browse_thread/thread/90d1bfbbc02397b5">explanation in discussion group post</a> what it is and why the new default value is recommended choice.</li>
<li>When using <strong>JRuby</strong> and JDBC you can set TNS_ADMIN environment variable to tnsnames.ora directory and then use <strong>TNS database alias</strong> in database.yml file (specify just database: option and remove host: option). This might be useful for more complex TNS connection definitions, e.g. connection to load balanced Oracle RAC.</li>
<li>Adapter will not raise error if it cannot locate <strong>ojdbc14.jar</strong> file. So either put it in $JRUBY_HOME/lib or ensure that it will be loaded by application server. Would love to hear feedback from people who are using this adapter with JRuby to find out if this behaves well now :)</li>
</ul>
<h3>Logging</h3>
<ul>
<li>Now you can get <strong>PL/SQL debugging</strong> information into your ActiveRecord log file. Use <strong>dbms_output.put_line</strong> in your PL/SQL procedures and functions (that are called from ActiveRecord models) and in your ActiveRecord model use <strong>connection.enable_dbms_output</strong> and <strong>connection.disable_dbms_output</strong> around your database calls to get dbms_output logging information into ActiveRecord log file. But please use it just in development environment with debug log level as in production it would add too much overhead for each database call. And this feature also requires that you install ruby-plsql gem.</li>
</ul>
<p>As you see this probably is the largest &#8220;point&#8221; release that I have had :) Thanks also to other contributors which patches were included in this release.</p>
<p>As always you can install Oracle enhanced adapter on any Ruby platform (Ruby 1.8.6 / 1.8.7 or Ruby 1.9.1 or JRuby) with</p>
<pre>
gem install activerecord-oracle_enhanced-adapter
</pre>
<p>If you have any questions please use <a href="http://groups.google.com/group/oracle-enhanced">discussion group</a> or post comments here.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rayapps.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rayapps.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rayapps.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rayapps.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rayapps.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rayapps.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rayapps.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rayapps.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rayapps.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rayapps.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=116&subd=rayapps&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rayapps.com/2009/09/28/new-features-in-activerecord-oracle-enhanced-adapter-version-1-2-2/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a94fbe334eb75d80da9dd0d3d352df1b?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">elietas</media:title>
		</media:content>
	</item>
		<item>
		<title>ActiveRecord Oracle enhanced adapter also on JRuby and Ruby 1.9</title>
		<link>http://blog.rayapps.com/2009/03/23/activerecord-oracle-enhanced-adapter-also-on-jruby-and-ruby-19/</link>
		<comments>http://blog.rayapps.com/2009/03/23/activerecord-oracle-enhanced-adapter-also-on-jruby-and-ruby-19/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 23:01:16 +0000</pubDate>
		<dc:creator>Raimonds Simanovskis</dc:creator>
				<category><![CDATA[jruby]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle-enhanced]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayapps.wordpress.com/?p=72</guid>
		<description><![CDATA[So far if you wanted to use Ruby on Rails on Oracle database you needed to use different adapters depending on the Ruby platform that you wanted to use. If you used original MRI (Matz Ruby interpreter) 1.8.6 then hopefully you were using Oracle enhanced adapter. But if you wanted to use JRuby then you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=72&subd=rayapps&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>So far if you wanted to use Ruby on Rails on Oracle database you needed to use different adapters depending on the Ruby platform that you wanted to use. If you used original MRI (Matz Ruby interpreter) 1.8.6 then hopefully you were using Oracle enhanced adapter. But if you wanted to use JRuby then you needed to use JDBC adapter that is maintained by JRuby team (and which sometimes might work differently than Oracle enhanced adapter). And if you wanted to use new Ruby 1.9.1 then you were out of luck as no adapter supported it.</p>
<p>Therefore I wanted to announce great news that <strong>ActiveRecord Oracle enhanced adapter 1.2.0 is released</strong> and it supports <strong>all three major Ruby platforms!</strong></p>
<ul>
<li>Use Oracle enhanced adapter on MRI 1.8.6 with ruby-oci8 1.0.x library or gem</li>
<li>Use Oracle enhanced adapter on JRuby (so far tested with 1.1.6) with JDBC Oracle driver</li>
<li>Use Oracle enhanced adapter on Ruby/YARV 1.9.1 with ruby-oci8 2.0 library or gem</li>
</ul>
<p>This provides you with much more flexibility to develop on one Ruby platform but deploy on another and on all three platforms you can use <a href="http://wiki.github.com/rsim/oracle-enhanced/usage">the same additional functionality</a> that Oracle enhanced adapter provides on top of standard ActiveRecord functionality.</p>
<p>And during testing of Oracle enhanced adapter on all platforms additional milestone was achieved &#8211; <strong>Oracle enhanced adapter passes 100% ActiveRecord unit tests!</strong> But to be honest I need to tell that I needed to patch quite many unit tests for Oracle specifics as not all SQL that runs on MySQL is also valid on Oracle. I published my patched branch of ActiveRecord unit tests at my <a href="http://github.com/rsim/rails/tree/oracle_enhanced">GitHub fork of Rails</a> &#8211; you can clone the repository and verify by yourself.</p>
<p>So please try out new version of Oracle enhanced adapter on any Ruby platform:</p>
<pre>
gem install activerecord-oracle_enahnced-adapter
</pre>
<p>If you have any questions please use <a href="http://groups.google.com/group/oracle-enhanced">discussion group</a> or post comments here. In nearest future I will also add more instructions how to install Oracle enhanced adapter on JRuby and Ruby 1.9.1 at <a href="http://wiki.github.com/rsim/oracle-enhanced">GitHub wiki page</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rayapps.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rayapps.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rayapps.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rayapps.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rayapps.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rayapps.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rayapps.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rayapps.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rayapps.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rayapps.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=72&subd=rayapps&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rayapps.com/2009/03/23/activerecord-oracle-enhanced-adapter-also-on-jruby-and-ruby-19/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a94fbe334eb75d80da9dd0d3d352df1b?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">elietas</media:title>
		</media:content>
	</item>
		<item>
		<title>More information sources on ActiveRecord Oracle enhanced adapter</title>
		<link>http://blog.rayapps.com/2009/01/03/more-information-sources-on-activerecord-oracle-enhanced-adapter/</link>
		<comments>http://blog.rayapps.com/2009/01/03/more-information-sources-on-activerecord-oracle-enhanced-adapter/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 21:51:32 +0000</pubDate>
		<dc:creator>Raimonds Simanovskis</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle-enhanced]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayapps.wordpress.com/?p=69</guid>
		<description><![CDATA[I&#8217;m glad to see that there are many users of ActiveRecord Oracle enhanced adapter and therefore comments in this blog is not anymore the best way how to communicate with Oracle enhanced adapter users. Therefore I created several other information exchange places which I hope will be more effective.
The latest addition is wiki pages on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=69&subd=rayapps&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m glad to see that there are many users of <a href="http://github.com/rsim/oracle-enhanced">ActiveRecord Oracle enhanced adapter</a> and therefore comments in this blog is not anymore the best way how to communicate with Oracle enhanced adapter users. Therefore I created several other information exchange places which I hope will be more effective.</p>
<p>The latest addition is <a href="http://github.com/rsim/oracle-enhanced/wikis">wiki pages on GitHub</a> where I put usage description and examples as well as some troubleshooting hints that previously were scattered in README file and different blog posts. This is the first place where to look for information about Oracle enhanced adapter. And if you are GitHub user then you can correct mistakes or add additional content also by yourself.</p>
<p>If you have some question or you would like to discuss some feature then you can use <a href="http://groups.google.com/group/oracle-enhanced">Google discussion group</a>. I will use this discussion group also for new release announcements as well so subscribe to it if you would like to get Oracle enhanced adapter news.</p>
<p>If you would like to report some bug or new feature (and patch would be greatly appreciated) then please use <a href="http://rsim.lighthouseapp.com/projects/11468-oracle-enhanced">Lighthouse issue tracker</a>.</p>
<p>And source code of Oracle enhanced adapter is still located in <a href="http://github.com/rsim/oracle-enhanced">Github repository</a>. If you are GitHub user then you can watch it or even fork it and experiment with some new features.</p>
<p>And BTW I just released <a href="http://groups.google.com/group/oracle-enhanced/browse_thread/thread/874e196fb3d76e89">Oracle enhanced adapter version 1.1.9</a> with some new features and it has been also tested with latest Rails 2.2 release.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rayapps.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rayapps.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rayapps.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rayapps.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rayapps.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rayapps.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rayapps.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rayapps.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rayapps.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rayapps.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=69&subd=rayapps&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rayapps.com/2009/01/03/more-information-sources-on-activerecord-oracle-enhanced-adapter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a94fbe334eb75d80da9dd0d3d352df1b?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">elietas</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenWorld unconference presentation about Rails on Oracle</title>
		<link>http://blog.rayapps.com/2008/09/26/openworld-unconference-presentation-about-rails-on-oracle/</link>
		<comments>http://blog.rayapps.com/2008/09/26/openworld-unconference-presentation-about-rails-on-oracle/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 00:09:08 +0000</pubDate>
		<dc:creator>Raimonds Simanovskis</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle-enhanced]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayapps.wordpress.com/?p=52</guid>
		<description><![CDATA[On last day of Oracle OpenWorld I did my unconference presentation &#8211; Using Ruby on Rails with legacy Oracle databases.
As I did not know if anyone will come to listen to it I was glad that six people attended (including Kuassi Mensah from Oracle who is helping to promote Ruby support inside Oracle). And on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=52&subd=rayapps&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>On last day of Oracle OpenWorld I did my <a href="http://wiki.oracle.com/page/Oracle+OpenWorld+Unconference">unconference</a> presentation &#8211; Using Ruby on Rails with legacy Oracle databases.</p>
<p>As I did not know if anyone will come to listen to it I was glad that six people attended (including <a href="http://db360.blogspot.com/">Kuassi Mensah</a> from Oracle who is helping to promote Ruby support inside Oracle). And on the previous day I also managed to show parts of my presentation to Rich and Anthony from <a href="http://theappslab.com/">Oracle AppsLab</a> team.</p>
<p>I published my slides on Slideshare:</p>
<div style="text-align:center;"><object type='application/x-shockwave-flash' wmode='opaque' data='http://static.slideshare.net/swf/ssplayer2.swf?id=619018&#038;doc=using-rails-with-legacy-oracle-db-1222386749548113-9' width='425' height='348'><param name='movie' value='http://static.slideshare.net/swf/ssplayer2.swf?id=619018&#038;doc=using-rails-with-legacy-oracle-db-1222386749548113-9' /><param name='allowFullScreen' value='true' /><param name='allowScriptAccess' value='always' /></object></div>
<p>And I published <a href="http://github.com/rsim/legacy_oracle_sample">my demo project</a> on GitHub:</p>
<div style="text-align:center;"><img src="http://rayapps.files.wordpress.com/2008/09/hr-schema-demo.png?w=640&#038;h=231" border="0" alt="hr_schema_demo.png" width="640" height="231" /></div>
<p>Thanks to all Oracle people who recognize my work on Ruby and Oracle integration and I hope that our common activities will increase number of Ruby and Rails projects on Oracle :)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rayapps.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rayapps.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rayapps.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rayapps.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rayapps.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rayapps.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rayapps.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rayapps.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rayapps.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rayapps.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=52&subd=rayapps&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rayapps.com/2008/09/26/openworld-unconference-presentation-about-rails-on-oracle/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a94fbe334eb75d80da9dd0d3d352df1b?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">elietas</media:title>
		</media:content>

		<media:content url="http://rayapps.files.wordpress.com/2008/09/hr-schema-demo.png" medium="image">
			<media:title type="html">hr_schema_demo.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle enhanced adapter presentation at RejectConf in Berlin</title>
		<link>http://blog.rayapps.com/2008/09/06/oracle-enhanced-adapter-presentation-at-rejectconf-in-berlin/</link>
		<comments>http://blog.rayapps.com/2008/09/06/oracle-enhanced-adapter-presentation-at-rejectconf-in-berlin/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 13:05:43 +0000</pubDate>
		<dc:creator>Raimonds Simanovskis</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle-enhanced]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayapps.wordpress.com/?p=42</guid>
		<description><![CDATA[
I just returned from RailsConf Europe in Berlin and attended a lot of good Ruby and Rails related sessions.
I also tried to submit there my session proposal about using Rails with Oracle but as there were too many good proposals and as my topic was with too narrow topic then it was not accepted. Therefore [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=42&subd=rayapps&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div style="text-align:center;"><img src="http://rayapps.files.wordpress.com/2008/09/rejectconf08.jpg?w=400&#038;h=315" alt="rejectconf08.jpg" border="0" width="400" height="315" /></div>
<p>I just returned from <a href="http://en.oreilly.com/railseurope2008/public/content/home">RailsConf Europe</a> in Berlin and attended a lot of good Ruby and Rails related sessions.</p>
<p>I also tried to submit there my session proposal about using Rails with Oracle but as there were too many good proposals and as my topic was with too narrow topic then it was not accepted. Therefore I used opportunity to give 5 minutes presentation about Oracle enhanced adapter in <a href="http://www.rug-b.com/trac/wiki/RejectConf">RejectConf</a> where anybody could present anything.</p>
<p><a href="http://rayapps.files.wordpress.com/2008/09/rejectconf-oracle-enhaced-adapter.pdf" title="rejectconf_oracle_enhaced_adapter.pdf">Here are my slides</a> that I used in this presentation. And at least one participant was interested in this topics as he uses Rails and Oracle and did not know about my adapter.</p>
<p>My next public appearance is planned at <a href="http://wiki.oracle.com/page/Oracle+OpenWorld+Unconference">Oracle OpenWorld unconference</a> where I have recerved time slot on Thursday, September 25th at 10am. Please come there if you are attending Oracle OpenWorld and are interested in how to use Ruby on Rails with your legacy Oracle databases.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/rayapps.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/rayapps.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rayapps.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rayapps.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rayapps.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rayapps.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rayapps.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rayapps.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rayapps.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rayapps.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rayapps.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rayapps.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=42&subd=rayapps&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rayapps.com/2008/09/06/oracle-enhanced-adapter-presentation-at-rejectconf-in-berlin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a94fbe334eb75d80da9dd0d3d352df1b?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">elietas</media:title>
		</media:content>

		<media:content url="http://rayapps.files.wordpress.com/2008/09/rejectconf08.jpg" medium="image">
			<media:title type="html">rejectconf08.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Latest additions to Oracle enhanced adapter</title>
		<link>http://blog.rayapps.com/2008/07/27/latest-additions-to-oracle-enhanced-adapter/</link>
		<comments>http://blog.rayapps.com/2008/07/27/latest-additions-to-oracle-enhanced-adapter/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 19:11:27 +0000</pubDate>
		<dc:creator>Raimonds Simanovskis</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle-enhanced]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayapps.wordpress.com/?p=38</guid>
		<description><![CDATA[Short information about latest enhancements in ActiveRecord Oracle enhanced adapter:

Oracle enhanced adapter is now compatible with composite_primary_keys gem which is quite useful if you are working with legacy databases.

Adapter now is also working correctly with Rails 2.1 partial_updates enabled. Previously I mentioned that you needed to disable partial_updates when using CLOB/BLOB columns. Now the issue [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=38&subd=rayapps&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Short information about latest enhancements in ActiveRecord Oracle enhanced adapter:</p>
<ul>
<li>Oracle enhanced adapter is now compatible with <a href="http://compositekeys.rubyforge.org/">composite_primary_keys gem</a> which is quite useful if you are working with legacy databases.
</li>
<li>Adapter now is also working correctly with Rails 2.1 partial_updates enabled. Previously I mentioned that you needed to disable partial_updates when using CLOB/BLOB columns. Now the issue is found and fixed and partial_updates are working with CLOB/BLOB columns.
</li>
<li>Support for other date and time formats when assigning string to :date or :datetime column. For example, if you would like to assign strings with format dd.mm.yyyy to date and datetime columns then add the following configuration options:
<pre>
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.string_to_date_format = "%d.%m.%Y"
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.string_to_time_format = "%d.%m.%Y %H:%M:%S"
</pre>
</li>
</ul>
<p>To get the new release of Oracle enhanced adapter do as always:</p>
<pre>
sudo gem install activerecord-oracle_enhanced-adapter
</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/rayapps.wordpress.com/38/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/rayapps.wordpress.com/38/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rayapps.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rayapps.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rayapps.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rayapps.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rayapps.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rayapps.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rayapps.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rayapps.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rayapps.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rayapps.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=38&subd=rayapps&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rayapps.com/2008/07/27/latest-additions-to-oracle-enhanced-adapter/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a94fbe334eb75d80da9dd0d3d352df1b?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">elietas</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom ActiveRecord create, add and delete methods for legacy databases</title>
		<link>http://blog.rayapps.com/2008/07/10/custom-activerecord-create-add-and-delete-methods-for-legacy-databases/</link>
		<comments>http://blog.rayapps.com/2008/07/10/custom-activerecord-create-add-and-delete-methods-for-legacy-databases/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 17:08:31 +0000</pubDate>
		<dc:creator>Raimonds Simanovskis</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle-enhanced]]></category>
		<category><![CDATA[pl/sql]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayapps.wordpress.com/?p=33</guid>
		<description><![CDATA[In some Ruby on Rails projects I am putting ActiveRecord interface on top of existing legacy databases. It is quite easy to specify legacy table names and primary keys in ActiveRecord models so that ActiveRecord would generate correct SQL SELECT statements to read data from legacy databases.
But it is more difficult to insert, update and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=33&subd=rayapps&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>In some Ruby on Rails projects I am putting ActiveRecord interface on top of existing legacy databases. It is quite easy to specify legacy table names and primary keys in ActiveRecord models so that ActiveRecord would generate correct SQL SELECT statements to read data from legacy databases.</p>
<p>But it is more difficult to insert, update and delete in legacy databases using ActiveRecord. When using Oracle legacy databases then quite often they have exposed PL/SQL APIs for writing to tables and you are typically not allowed to directly modify tables with INSERT, UPDATE and DELETE statements.</p>
<p>Therefore I created support for custom create, update and delete methods in the <a href="http://rubyforge.org/frs/?group_id=6212&amp;release_id=23785">version 1.1.3 of ActiveRecord Oracle enhanced adapter</a> which uses also my <a href="http://github.com/rsim/ruby-plsql">ruby-plsql gem</a>.</p>
<p>Let&#8217;s look at the following example. Assume that we have the following table:</p>
<pre>
      CREATE TABLE test_employees (
        employee_id   NUMBER(6,0),
        first_name    VARCHAR2(20),
        last_name     VARCHAR2(25),
        hire_date     DATE,
        salary        NUMBER(8,2),
        version       NUMBER(15,0),
        create_time   DATE,
        update_time   DATE
      )
</pre>
<p>And we have the following PL/SQL API package that should be used to write to this table:</p>
<pre>
      CREATE OR REPLACE PACKAGE test_employees_pkg IS
        PROCEDURE create_employee(
            p_first_name    VARCHAR2,
            p_last_name     VARCHAR2,
            p_hire_date     DATE,
            p_salary        NUMBER,
            p_employee_id   OUT NUMBER);
        PROCEDURE update_employee(
            p_employee_id   NUMBER,
            p_first_name    VARCHAR2,
            p_last_name     VARCHAR2,
            p_hire_date     DATE,
            p_salary        NUMBER);
        PROCEDURE delete_employee(
            p_employee_id   NUMBER);
      END;
</pre>
<p>Then we define ActiveRecord model in the following way:</p>
<pre>
    class TestEmployee &lt; ActiveRecord::Base
      set_primary_key :employee_id
      # should return ID of new record
      set_create_method do
        plsql.test_employees_pkg.create_employee(
          :p_first_name =&gt; first_name,
          :p_last_name =&gt; last_name,
          :p_hire_date =&gt; hire_date,
          :p_salary =&gt; salary,
          :p_employee_id =&gt; nil
        )[:p_employee_id]
      end
      # return value is ignored
      set_update_method do
        plsql.test_employees_pkg.update_employee(
          :p_employee_id =&gt; id,
          :p_first_name =&gt; first_name,
          :p_last_name =&gt; last_name,
          :p_hire_date =&gt; hire_date,
          :p_salary =&gt; salary
        )
      end
      # return value is ignored
      set_delete_method do
        plsql.test_employees_pkg.delete_employee(
          :p_employee_id =&gt; id
        )
      end
    end
</pre>
<p>And as a result we can use this model in the same way as other ActiveRecord models:</p>
<pre>
    @employee = TestEmployee.create(
      :first_name =&gt; "First",
      :last_name =&gt; "Last",
      :hire_date =&gt; Date.today
    )
    @employee.reload
    @employee.first_name = "Second"
    @employee.save!
    @employee.destroy
</pre>
<p>And all writing to the database will be done using defined API procedures.</p>
<p>Currently this functionality is embedded into Oracle enhanced adapter but if somebody needs it also for other databases this functionality could easily be extraced from the adapter.</p>
<p>To get the new release of Oracle enhanced adapter just do:</p>
<pre>
sudo gem install activerecord-oracle_enhanced-adapter
</pre>
<p>Source code of Oracle enhanced adapter is located at <a href="http://github.com/rsim/oracle-enhanced">GitHub</a> and you can submit bug reports and enhancement requests in <a href="http://rsim.lighthouseapp.com/projects/11468-oracle-enhanced/tickets">Lighthouse</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/rayapps.wordpress.com/33/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/rayapps.wordpress.com/33/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rayapps.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rayapps.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rayapps.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rayapps.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rayapps.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rayapps.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rayapps.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rayapps.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rayapps.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rayapps.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=33&subd=rayapps&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rayapps.com/2008/07/10/custom-activerecord-create-add-and-delete-methods-for-legacy-databases/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a94fbe334eb75d80da9dd0d3d352df1b?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">elietas</media:title>
		</media:content>
	</item>
		<item>
		<title>ActiveRecord Oracle enhanced adapter version 1.1.1 released</title>
		<link>http://blog.rayapps.com/2008/06/28/activerecord-oracle-enhanced-adapter-version-111-released/</link>
		<comments>http://blog.rayapps.com/2008/06/28/activerecord-oracle-enhanced-adapter-version-111-released/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 12:27:03 +0000</pubDate>
		<dc:creator>Raimonds Simanovskis</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle-enhanced]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayapps.wordpress.com/?p=30</guid>
		<description><![CDATA[I just released new version of ActiveRecord Oracle enhanced adapter which includes several new enhancements which could be useful if you use ActiveRecord with legacy Oracle databases:

Added ignore_table_columns option for class definitions
You can specify which table (or view) columns should be ignored by ActiveRecord &#8211; these could be either columns which you do not need [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=30&subd=rayapps&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I just released <a href="http://rubyforge.org/frs/?group_id=6212&amp;release_id=23422">new version</a> of <a href="http://blog.rayapps.com/2008/05/13/activerecord-oracle-enhanced-adapter/">ActiveRecord Oracle enhanced adapter</a> which includes several new enhancements which could be useful if you use ActiveRecord with legacy Oracle databases:</p>
<ul>
<li>Added ignore_table_columns option for class definitions</li>
<p>You can specify which table (or view) columns should be ignored by ActiveRecord &#8211; these could be either columns which you do not need in Rails application or which have currently unsupported data types. For example:</p>
<pre>
    class Employee &lt; ActiveRecord::Base
      ignore_table_columns  :phone_number, :hire_date
    end
</pre>
<li>Added support for TIMESTAMP columns</li>
<p>You can create tables with :timestamp data type which will create TIMESTAMP columns and you can access values from TIMESTAMP columns. Unfortunately due to current ruby-oci8 limitations when you will retrieve TIMESTAMP values it will be without fractional seconds (but if you pass Time value with fractional seconds then it will be stored in database).</p>
<li>NLS_DATE_FORMAT and NLS_TIMESTAMP_FORMAT independent DATE and TIMESTAMP columns support</li>
<p>By default Oracle adapter (and enhanced adapter as well) changes NLS_DATE_FORMAT and NLS_TIMESTAMP_FORMAT to &#8216;DD-MON-YYYY HH24:MI:SS&#8217;. But if you are working with some legacy database which requires different NLS date settings then now you can change these settings to different ones. You can put in some initialization file some other NLS settings, e.g.:</p>
<pre>
ActiveRecord::Base.connection.execute %q{alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS'}
ActiveRecord::Base.connection.execute %q{alter session set nls_timestamp_format = 'DD-MON-YYYY HH24:MI:SS'}
</pre>
<p>and ActiveRecord will continue to work correctly with date values.
</ul>
<p>Also one Rails 2.1 related issue was solved. Previously Oracle enhanced adapter always added after_save callback to ActiveRecord session store which stores BLOB data in the database (as in Rails 2.0 there was issue that this callback was not added). Now in Rails 2.1 this callback is added by ActiveRecord therefore Oracle enhanced adapter checks if this callback is already added or not. So now this should work correctly both in Rails 2.0 and Rails 2.1.</p>
<p>Also I have noticed that in some Rails 2.1 applications Oracle adapter is failing on ActiveRecord session store updates when partial updates are enabled. If you also have such issue then put this into your initialization file which will work as workaround until I will find what is causing this problem:</p>
<pre>
CGI::Session::ActiveRecordStore::Session.partial_updates = false
</pre>
<p>To get the new release just do:</p>
<pre>
sudo gem install activerecord-oracle_enhanced-adapter
</pre>
<p>Source code of Oracle enhanced adapter is located at <a href="http://github.com/rsim/oracle-enhanced">GitHub</a>. And you can submit bug reports and enhancement requests in <a href="http://rsim.lighthouseapp.com/projects/11468-oracle-enhanced/tickets">Lighthouse</a>. There you can see also some identified enhancements &#8211; please add comments to them if you also would like to have them. Then it will be easier for me to select what to include in next version of adapter.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/rayapps.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/rayapps.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rayapps.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rayapps.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rayapps.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rayapps.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rayapps.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rayapps.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rayapps.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rayapps.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rayapps.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rayapps.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=30&subd=rayapps&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rayapps.com/2008/06/28/activerecord-oracle-enhanced-adapter-version-111-released/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a94fbe334eb75d80da9dd0d3d352df1b?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">elietas</media:title>
		</media:content>
	</item>
		<item>
		<title>ActiveRecord Oracle enhanced adapter</title>
		<link>http://blog.rayapps.com/2008/05/13/activerecord-oracle-enhanced-adapter/</link>
		<comments>http://blog.rayapps.com/2008/05/13/activerecord-oracle-enhanced-adapter/#comments</comments>
		<pubDate>Mon, 12 May 2008 22:05:47 +0000</pubDate>
		<dc:creator>Raimonds Simanovskis</dc:creator>
				<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle-enhanced]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://rayapps.wordpress.com/?p=27</guid>
		<description><![CDATA[In all Ruby on Rails on Oracle projects where I am using original ActiveRecord Oracle adapter I always create some &#8220;monkey patches&#8221; of Oracle adapter to support my needs. I have written about several of these patches in this blog (see 1, 2, 3).
As such monkey patches are not easily maintainable and reusable between projects [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=27&subd=rayapps&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>In all Ruby on Rails on Oracle projects where I am using original ActiveRecord Oracle adapter I always create some &#8220;monkey patches&#8221; of Oracle adapter to support my needs. I have written about several of these patches in this blog (see <a href="http://blog.rayapps.com/2008/01/26/make-rails-database-migrations-faster-on-oracle/">1</a>, <a href="http://blog.rayapps.com/2008/01/08/fix-for-rails-20-on-oracle-with-database-session-store/">2</a>, <a href="http://blog.rayapps.com/2007/11/16/some-issues-with-oracle-views-as-activerecord-source/">3</a>).</p>
<p>As such monkey patches are not easily maintainable and reusable between projects I decided to fork existing Oracle adapter and create my own ActiveRecord Oracle &#8220;enhanced&#8221; adapter where I will add all my enhancements.</p>
<p>Today I released first version (1.1.0) of Oracle enhanced adapter on <a href="http://rubyforge.org/projects/oracle-enhanced/">RubyForge</a> as well as source code is available at <a href="http://github.com/rsim/oracle-enhanced">GitHub</a>.</p>
<p>To install Oracle enhanced adapter execute (should be available soon):</p>
<pre>
sudo gem install activerecord-oracle_enhanced-adapter
</pre>
<p>To use it you need to use &#8220;oracle_enhanced&#8221; as the adapter name in database.yml configuration file instead of &#8220;oracle&#8221;. In addition I recommend to create config/initializers/oracle_enhanced.rb file where to put any adapter configuration options that you can see below.</p>
<p>Initial version contains the following enhancements:</p>
<ul>
<li>Improved perfomance of schema dump methods when used on large data dictionaries</li>
<li>Added LOB writing callback for sessions stored in database (see <a href="http://blog.rayapps.com/2008/01/08/fix-for-rails-20-on-oracle-with-database-session-store/">previous post</a>)</li>
<li>Added emulate_dates_by_column_name option</li>
<p>Set the option below and as a result columns with DATE in their name will be emulated as Date (and not as Time which is default for DATE columns in database)</p>
<pre>
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_dates_by_column_name = true
</pre>
<li>Added emulate_integers_by_column_name option</li>
<p>Set the option below and as a result number columns with ID at the end of column always will be emulated as Fixnum (useful if in legacy database column type is specified just as NUMBER without precision information which by default is mapped to BigDecimal Ruby type)</p>
<pre>
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_integers_by_column_name = true
</pre>
<li>Added emulate_booleans_from_strings option</li>
<p>Set the option below and as a result CHAR(1), VARCHAR2(1) columns or VARCHAR2 columns with FLAG or YN at the end of their name will be emulated as booleans (and &#8220;Y&#8221; and &#8220;N&#8221; will be used to store true and false values). This is useful for legacy databases where Rails default convention of NUMBER(1) for boolean values cannot be used (e.g. if you are using Oracle E-Business Suite where booleans are stored as &#8220;Y&#8221; and &#8220;N&#8221;).</p>
<pre>
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.emulate_booleans_from_strings = true
</pre>
</ul>
<p>If you need to override how date, integer or boolean columns are identified then you can redefine class methods is_date_column?, is_integer_column? and is_boolean_column? definitions in OracleEnhancedAdapter class.</p>
<p>Please comment if you find these enhancements useful in your projects and also what other Oracle adapter enhancements you need in your Ruby on Rails on Oracle projects.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/rayapps.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/rayapps.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rayapps.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rayapps.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rayapps.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rayapps.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rayapps.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rayapps.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rayapps.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rayapps.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rayapps.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rayapps.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rayapps.com&blog=1589116&post=27&subd=rayapps&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rayapps.com/2008/05/13/activerecord-oracle-enhanced-adapter/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a94fbe334eb75d80da9dd0d3d352df1b?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">elietas</media:title>
		</media:content>
	</item>
	</channel>
</rss>