Class: Lotus::Model::Adapters::Sql::Consoles::Postgresql
- Inherits:
-
Object
- Object
- Lotus::Model::Adapters::Sql::Consoles::Postgresql
- Defined in:
- lib/lotus/model/adapters/sql/consoles/postgresql.rb
Overview
Instance Method Summary collapse
- #connection_string ⇒ Object
-
#initialize(uri) ⇒ Postgresql
constructor
A new instance of Postgresql.
Constructor Details
#initialize(uri) ⇒ Postgresql
Returns a new instance of Postgresql.
8 9 10 |
# File 'lib/lotus/model/adapters/sql/consoles/postgresql.rb', line 8 def initialize(uri) @uri = uri end |
Instance Method Details
#connection_string ⇒ Object
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 |