These are chat archives for rails-sqlserver/activerecord-sqlserver-adapter

10th
Feb 2015
Sean Griffin
@sgrif
Feb 10 2015 15:58
@metaskills Ping me when you're around
Ken Collins
@metaskills
Feb 10 2015 15:59
Hey @sgrif what is up?
Sean Griffin
@sgrif
Feb 10 2015 16:02
So I need to get rid of the adapter specific types for Rails 5.
Or at least the ones that override the abstract versions
I'm figuring that can be mostly handled by having the column in the quoting logic for the adapter
Are there any use cases that I'm missing on your end?
Also have to figure out what the API is going to be, since I also have to deprecate the column being used for type casting in quote in 5.0. :\
Maybe something like:
def quote(value, column = nil, use_column_to_type_cast = true)
  if column && use_column_to_type_cast
    deprecate & type cast
  end
end
Of course now I have this change in arity that I have to break in 5.1... :\
Alternative:
def quote(value, column_or_table_name = nil, column_name = nil)
  if column_or_table_name && column_name
    fetch column for sql type info but don't typecast
  elsif column_or_table_name
     deprecate & type cast
   end
end
Ken Collins
@metaskills
Feb 10 2015 16:07
So the only time column has really been needed is for the different date/time columns. I have to change the format for #to_s(:db) with a block.
All other ways of returning a scoped type Data object works for me.
Sean Griffin
@sgrif
Feb 10 2015 16:07
Right, that's the thing though I'm needing to drop the typed data object
Move that back into the adapter when possible
At least for Binary, String, Numeric, Date, Time, etc
All the abstract ones
Binary & Dates are the main two. Otherwise it becomes difficult for people to make types which work on multiple adapters
Ken Collins
@metaskills
Feb 10 2015 16:09
Sadly, maybe my best advice would come if I created a branch and tried to ride these changes with ya.
(also, having a hard time context switching right now, super tired today… travel)
Sean Griffin
@sgrif
Feb 10 2015 16:09
No worries, if you want to talk about it another time that's fine too
Ken Collins
@metaskills
Feb 10 2015 16:10
Most anytime… I have a folder on my desktop with your name on it :)
Folders on my Desktop are my poor man’s note system.