Skip to content
Snippets Groups Projects
Commit 6ff72c79 authored by João Victor Risso's avatar João Victor Risso
Browse files

Replace connect method with conn

parent 5ed7dcc4
No related branches found
No related tags found
No related merge requests found
......@@ -21,12 +21,9 @@ module ActiveRecord
config[:port] = config.delete(:port) || "50000"
config[:user] = config.delete(:username) || "monetdb"
config[:passwd] = config.delete(:password) if config[:password]
config[:db_name] = config.delete(:database) if config[:database]
config[:auth_type] = config[:auth_type] || "SHA1"
config[:lang] = "sql"
begin
client.connect(user = config[:user], passwd = config[:passwd], lang = config[:lang], host = config[:host], port = config[:port], database_connection_name = config[:db_name], auth_type = config[:auth_type])
client.conn(config)
rescue MonetDBConnectionError => error
if error.message.include?("no such database")
raise ActiveRecord::NoDatabaseError.new(error.message, error)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment