POC for Oracle 12c identity datatype support in Rails 6

There was a plan called nextval to support Oracle identity datatype which was canceled for Rails 5.2.

The main reason for this cancellation was the technical difficulty that Oracle database does not support inserting default values, Also I was not able to persuade Oracle community why this feature is needed from Rails point of view.

As of right now, Oracle enhanced adapter prefetches primary key value from each sequence and adds the primary key name id to the SQL statements generated. However, supporting identity type like auto_increment in MySQL would not need to prefetch primary key value. Most of the SQL statements generated by Active Record unit test will not add id column explicitly, which calls empty_insert_statement_value raising NotImplementedError. Finally, I gave up the "nextval" branch plan.

A couple of months later, @kamipo suggested that disabling partial writes would workaround the Oracle missing inserting default values. By using partial write feature, Active Record will not update columns whose values not changed. Disabling partial writes for the primary key column will not impact performance since Oracle enhanced adapter already prefetches the primary key column value and add id column name to the SQL statements generated.

Actually, this feature definitely needs changing Rails implementations, such as each connection adapter can handle partial writes. To prove this concept, I'm going to create poc_identity branch at Oracle enhanced adapter. Once this POC is proven, identity data type support will be a major change for Oracle enhanced adapter 6.