lib/sequel/database/dataset_defaults.rb in sequel-4.45.0 vs lib/sequel/database/dataset_defaults.rb in sequel-4.46.0

- old
+ new

@@ -7,10 +7,11 @@ # This methods change the default behavior of this database's datasets. # --------------------- # The default class to use for datasets DatasetClass = Sequel::Dataset + Sequel::Deprecation.deprecate_constant(self, :DatasetClass) # SEQUEL5: Remove @identifier_input_method = nil @identifier_output_method = nil @quote_identifiers = nil @@ -96,10 +97,15 @@ private # The default dataset class to use for the database def dataset_class_default - self.class.const_get(:DatasetClass) + if self.class == Sequel::Database + Sequel::Dataset + else + Sequel::Deprecation.deprecate("Using self.class.const_get(:DatasetClass) to get the default dataset class", "Modify the database adapter to implement Database#dataset_class_default") + self.class.const_get(:DatasetClass) + end end # Reset the default dataset used by most Database methods that # create datasets. Usually done after changes to the identifier # mangling methods.