Class: Trinidad::Extensions::SqliteDbpoolWebAppExtension

Inherits:
DbpoolWebAppExtension
  • Object
show all
Defined in:
lib/trinidad_sqlite_dbpool_extension/sqlite_webapp_extension.rb

Instance Method Summary collapse

Instance Method Details

#driver_nameObject



7
8
9
10
# File 'lib/trinidad_sqlite_dbpool_extension/sqlite_webapp_extension.rb', line 7

def driver_name
  defined?(Jdbc::SQLite3.driver_name) ? Jdbc::SQLite3.driver_name :
    'org.sqlite.JDBC'
end

#load_driverObject



16
17
18
19
# File 'lib/trinidad_sqlite_dbpool_extension/sqlite_webapp_extension.rb', line 16

def load_driver
  require 'jdbc/sqlite3'
  Jdbc::SQLite3.load_driver if defined?(Jdbc::SQLite3.load_driver)
end

#protocolObject



12
13
14
# File 'lib/trinidad_sqlite_dbpool_extension/sqlite_webapp_extension.rb', line 12

def protocol
  'jdbc:sqlite://'
end