On Monday, April 9, 2018 at 4:57:15 PM UTC-7, Joe Rzepiejewski wrote:
> We're using Redshift with Sequel gem *4.45* and are able to override the 
> methods for `insert_returning_sql` and `supports_returning?`.
> When we upgraded to Sequel *>= 4.46* our overridden methods are *not* 
> called.  (We have the code to override the Database and Dataset -- akin to 
> what's in the sequel-redshift 0.0.1 gem)
> It appears that our overridden Redshift dataset method is not being 
> called.  e.g. db[...].insert(...) and returns the standard 
> Postgres::Dataset not our Sequel::Redshift::Dataset.  I am trying to 
> determine what has changed such that the overridden Dataset is not being 
> called.

Not sure how the Redshift database adapter is setup, but if it works by 
inherited from the postgres adapter and setting a DatasetClass constant, 
it's probably the result of this change mentioned in the release notes:

* Automatically looking up the dataset class for a Database
  instance by looking for a DatasetClass constant in the Database's
  class is now deprecated.  All adapters that ship with Sequel have
  been converted, but external adapters should now define the
  Database#dataset_class_default private method appropriately
  to return the correct dataset class

Implement the Database#dataset_class_default method in the redshift adapter 
return the appropriate dataset class in that case.

If that is not it, you'll want to bisect the changes between 4.45.0 and 
4.46.0 and see what caused it, and try to fix the problem.


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 sequel-talk+unsubscr...@googlegroups.com.
To post to this group, send email to sequel-talk@googlegroups.com.
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to