class FluentQuery::Drivers::SQLite3
SQLite3
database driver.
Public Instance Methods
authentification()
click to toggle source
Returns authentification settings. @return [Array] with username and password
# File lib/fluent-query/drivers/sqlite3.rb, line 88 def authentification @_nconnection_settings.take_values(:username, :password) end
connection_string()
click to toggle source
Builds connection string. @return [String] connection string
# File lib/fluent-query/drivers/sqlite3.rb, line 67 def connection_string if @_nconnection_settings.nil? raise FluentQuery::Drivers::Exception::new('Connection settings hasn\'t been assigned yet.') end # Gets settings file = @_nconnection_settings[:file] # Builds connection string and other parameters connection_string = "DBI:SQLite3:" << file.to_s # Returns return connection_string end
driver_name()
click to toggle source
Returns the DBI driver name. @return [String] driver name
# File lib/fluent-query/drivers/sqlite3.rb, line 41 def driver_name "SQLite3" end
known_token?(group, token_name)
click to toggle source
Indicates token is known.
Calls superclass method
# File lib/fluent-query/drivers/sqlite3.rb, line 28 def known_token?(group, token_name) super(group, token_name, @@__known_tokens) end
open_connection(settings)
click to toggle source
Opens the connection.
It’s lazy, so it will open connection before first request through {@link native_connection()} method.
Calls superclass method
# File lib/fluent-query/drivers/sqlite3.rb, line 53 def open_connection(settings) if not settings[:file] raise FluentQuery::Drivers::Exception::new("Database file name is required for connection.") end super(settings) end