Hi Jeremy,

I got a little bit further with your plugin. The UPDATE statements 
generated look good. I removed the incrementing of lock_version.
There is still the problem with the column type. I have been debugging. It 
seems to me, that the columns do not get the correct type when Sequel reads 
the schema. This has to do with upper and lower case property names 
(specifically DB_TYPE vs db_type).
I added this to shared/mssql.rb:
      def schema_column_type(db_type)
        case db_type
        when /\A(?:bit)\z/io
          :boolean
        when /\A(?:(?:small)?money)\z/io
          :decimal
*        when /\A(?:timestamp)\z/io*
*          :blob*
        else
          super
        end
      end
but because schema_parse_table(table_name, opts) gets the db_type as 
DB_TYPE, the timestamp column gets type string.
For schema parsing of MSSQL, I think you need to always use :downcase.

I have my doubts about dataset/sql.rb (method  def update_set_sql(sql)). It 
just checks for the ruby type, so maybe it will always see a timestamp 
field as string, no matter the db_type.
In tiny_tds.rb, I get an exception in def literal_string_append(sql, v) because 
it tries to handle the 8 bytes as a string.
Unfortunately, my knowledge is too limited to solve all this.

I'm sorry I have to leave it here. I am on a tight schedule for the current 
project, so we will use ActiveRecord for now.
Hopefully the issues will be solved, and hopefully I will have more time in 
the future.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to