Class: Lotus::Model::Adapters::Sql::Consoles::Postgresql

Inherits:
Object
  • Object
show all
Defined in:
lib/lotus/model/adapters/sql/consoles/postgresql.rb

Overview

Since:

  • 0.1.0

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ Postgresql

Returns a new instance of Postgresql.

Since:

  • 0.1.0



8
9
10
# File 'lib/lotus/model/adapters/sql/consoles/postgresql.rb', line 8

def initialize(uri)
  @uri = uri
end

Instance Method Details

#connection_stringObject

Since:

  • 0.1.0



12
13
14
15
16
17
18
19
20
# File 'lib/lotus/model/adapters/sql/consoles/postgresql.rb', line 12

def connection_string
  configure_password
  str = 'psql'
  str << host
  str << database
  str << port if port
  str << username if username
  str
end