diff --git a/lib/sequel/extensions/auto_cast_date_and_time.rb b/lib/sequel/extensions/auto_cast_date_and_time.rb index 181638f6a..cf4aec030 100644 --- a/lib/sequel/extensions/auto_cast_date_and_time.rb +++ b/lib/sequel/extensions/auto_cast_date_and_time.rb @@ -45,8 +45,6 @@ # module Sequel module AutoCastDateAndTime - private - # :nocov: # Mark the datasets as requiring sql standard date times. This is only needed @@ -57,6 +55,8 @@ def requires_sql_standard_datetimes? end # :nocov: + private + # Explicitly cast SQLTime time objects to TIME. def literal_sqltime_append(sql, v) sql << "TIME " diff --git a/spec/extensions/pg_array_spec.rb b/spec/extensions/pg_array_spec.rb index f43f731b8..b2b5d732c 100644 --- a/spec/extensions/pg_array_spec.rb +++ b/spec/extensions/pg_array_spec.rb @@ -8,13 +8,14 @@ before do @db = Sequel.connect('mock://postgres') @db.extend_datasets(Module.new do + def quote_identifiers?; false end + private def default_time_format "'%H:%M:%S'" end def default_timestamp_format "'%Y-%m-%d %H:%M:%S'" end - def quote_identifiers?; false end end) @db.extension(:pg_array) @m = Sequel::Postgres diff --git a/spec/extensions/pg_multirange_spec.rb b/spec/extensions/pg_multirange_spec.rb index 8c4da463e..ebf14efae 100644 --- a/spec/extensions/pg_multirange_spec.rb +++ b/spec/extensions/pg_multirange_spec.rb @@ -11,13 +11,14 @@ def @db.server_version(*) 140000 end @R = Sequel::Postgres::PGRange @MR = Sequel::Postgres::PGMultiRange @db.extend_datasets do + def quote_identifiers?; false end + private def default_time_format "'%H:%M:%S'" end def default_timestamp_format "'%Y-%m-%d %H:%M:%S'" end - def quote_identifiers?; false end end @db.extension(:pg_array, :pg_multirange) end diff --git a/spec/extensions/pg_range_spec.rb b/spec/extensions/pg_range_spec.rb index f6c00ef47..6bd349054 100644 --- a/spec/extensions/pg_range_spec.rb +++ b/spec/extensions/pg_range_spec.rb @@ -9,13 +9,14 @@ @db = Sequel.connect('mock://postgres') @R = Sequel::Postgres::PGRange @db.extend_datasets do + def quote_identifiers?; false end + private def default_time_format "'%H:%M:%S'" end def default_timestamp_format "'%Y-%m-%d %H:%M:%S'" end - def quote_identifiers?; false end end @db.extension(:pg_array, :pg_range) end