lib/sequel/adapters/tinytds.rb in sequel-3.25.0 vs lib/sequel/adapters/tinytds.rb in sequel-3.26.0

- old
+ new

@@ -72,12 +72,21 @@ g.constraints.each{|c| pks = c[:columns] if c[:type] == :primary_key} g.columns.each{|c| c[:null] = true if !pks.include?(c[:name]) && !c[:primary_key] && !c.has_key?(:null) && !c.has_key?(:allow_null)} super end + # tiny_tds uses TinyTds::Error as the base error class. + def database_error_classes + [TinyTds::Error] + end + # Close the TinyTds::Client object. def disconnect_connection(c) c.close + end + + def disconnect_error?(e, opts) + super || (opts[:conn] && !opts[:conn].active?) end end class Dataset < Sequel::Dataset include Sequel::MSSQL::DatasetMethods