Class: Barthes::Client::Pgsql
Instance Method Summary collapse
- #execute_query(query) ⇒ Object
-
#initialize(env) ⇒ Pgsql
constructor
A new instance of Pgsql.
Methods inherited from Rdb
Constructor Details
#initialize(env) ⇒ Pgsql
5 6 7 8 9 10 11 12 13 |
# File 'lib/barthes/client/pgsql.rb', line 5 def initialize(env) @client = PG::connect( host: env['host'], user: env['user'], password: env['password'], dbname: env['database'], sslmode: 'disable' ) end |
Instance Method Details
#execute_query(query) ⇒ Object
15 16 17 |
# File 'lib/barthes/client/pgsql.rb', line 15 def execute_query(query) @client.exec(query) end |