Class: Trinidad::Extensions::PostgresqlDbpoolWebAppExtension

Inherits:
DbpoolWebAppExtension
  • Object
show all
Defined in:
lib/trinidad_postgresql_dbpool_extension/postgresql_webapp_extension.rb

Instance Method Summary collapse

Instance Method Details

#driver_nameObject



7
8
9
10
# File 'lib/trinidad_postgresql_dbpool_extension/postgresql_webapp_extension.rb', line 7

def driver_name
  defined?(Jdbc::Postgres.driver_name) ? Jdbc::Postgres.driver_name :
    'org.postgresql.Driver'
end

#load_driverObject



16
17
18
19
# File 'lib/trinidad_postgresql_dbpool_extension/postgresql_webapp_extension.rb', line 16

def load_driver
  require 'jdbc/postgres'
  Jdbc::Postgres.load_driver if defined?(Jdbc::Postgres.load_driver)
end

#protocolObject



12
13
14
# File 'lib/trinidad_postgresql_dbpool_extension/postgresql_webapp_extension.rb', line 12

def protocol
  'jdbc:postgresql://'
end