Clint Hill wrote:
If I choose to limit the size to 255 as a default - is the proper place to do that in the modify_types method call like so?

   def modify_types(tp)
      tp[:primary_key] = "NUMBER(38) NOT NULL PRIMARY KEY"
      tp[:integer] = { :name => "NUMBER", :limit => 38 }
      tp[:datetime] = { :name => "DATE" }
      tp[:timestamp] = { :name => "DATE" }
      tp[:time] = { :name => "DATE" }
      tp[:date] = { :name => "DATE" }
      tp[:string][:limit] = 255                <==========
      tp
    end

No, definitely not. The default value _should_ be 4000. If I remember correctly, there are some tests in Rails that hinge on that for Oracle. Or at least there used to be.
So modify your own code to take that into account - not the adapter code.
Why do you want to limit it to 255, btw? There is no real reason unless you have a business need to not store strings longer than 255 - and in that case that should be expressed in your application anyway.

Cheers

--
Ola Bini (http://olabini.com) JRuby Core Developer
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
Practical JRuby on Rails (http://apress.com/book/view/9781590598818)

"Yields falsehood when quined" yields falsehood when quined.



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to