Permalink
Browse files

Minor fix for JDBC connect server opts

  • Loading branch information...
1 parent 64b3320 commit da74c564ebe921159211ec1540022f7cab6df40a @jeremyevans committed Apr 27, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/sequel/adapters/jdbc.rb
View
3 lib/sequel/adapters/jdbc.rb
@@ -160,10 +160,11 @@ def call_sproc(name, opts = {})
# Connect to the database using JavaSQL::DriverManager.getConnection.
def connect(server)
+ opts = server_opts(server)
conn = if jndi?
get_connection_from_jndi
else
- args = [uri(server_opts(server))]
+ args = [uri(opts)]
args.concat([opts[:user], opts[:password]]) if opts[:user] && opts[:password]
JavaSQL::DriverManager.getConnection(*args)
end

0 comments on commit da74c56

Please sign in to comment.