Method: FluentQuery::Connection#open!

Defined in:
lib/fluent-query/connection.rb

#open!(settings = nil) ⇒ Object



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/fluent-query/connection.rb', line 161

def open!(settings = nil)

    if @_open
        raise FluentQuery::Exception::new("Connection is already open.")
    end

    ##

    if (settings == nil) and @_settings
        settings = @_settings
    elsif settings == nil
        raise FluentQuery::Exception::new("Connection settings hasn't been set or given to the #open method.")
    end
    
    self.driver.open_connection(settings)

    ##

    @_open = true
    
end