Temp: Validate not_nil schemes

This commit is contained in:
Brian J. Cardiff 2020-05-19 12:06:27 -03:00
parent ed686ad301
commit e6efdb5e48
1 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ module DB
record ExecResult, rows_affected : Int64, last_insert_id : Int64 record ExecResult, rows_affected : Int64, last_insert_id : Int64
# :nodoc: # :nodoc:
def self.driver_class(driver_name) : Driver.class def self.driver_class(driver_name : String) : Driver.class
drivers[driver_name]? || drivers[driver_name]? ||
raise(ArgumentError.new(%(no driver was registered for the schema "#{driver_name}", did you maybe forget to require the database driver?))) raise(ArgumentError.new(%(no driver was registered for the schema "#{driver_name}", did you maybe forget to require the database driver?)))
end end
@ -161,7 +161,7 @@ module DB
end end
private def self.build_driver(uri : URI) private def self.build_driver(uri : URI)
driver_class(uri.scheme).new driver_class(uri.scheme.not_nil!).new
end end
# :nodoc: # :nodoc: