Module: Rubeus::Extensions::Java::Sql::DriverManager::ClassMethods
- Defined in:
- lib/rubeus/extensions/java/sql/driver_manager.rb
Constant Summary collapse
- CONNECT_DEFAULT_OPTIONS =
{ :auto_setup_manager => true # trueならconnectメソッドの引数urlからドライバを探してロードします }.freeze
Instance Method Summary collapse
- #connect(url, user = '', password = '', options = CONNECT_DEFAULT_OPTIONS, &block) ⇒ Object
- #setup_for(url, options = nil) ⇒ Object
Instance Method Details
#connect(url, user = '', password = '', options = CONNECT_DEFAULT_OPTIONS, &block) ⇒ Object
16 17 18 19 |
# File 'lib/rubeus/extensions/java/sql/driver_manager.rb', line 16 def connect(url, user = '', password = '', = CONNECT_DEFAULT_OPTIONS, &block) setup_for(url, ) if [:auto_setup_manager] with_close(get_connection(url, user, password), &block) end |
#setup_for(url, options = nil) ⇒ Object
21 22 23 |
# File 'lib/rubeus/extensions/java/sql/driver_manager.rb', line 21 def setup_for(url, = nil) DriverManager::Loader.setup_for(url, ) end |