Module: PgBouncerHero::Methods::Basics
- Included in:
- Database
- Defined in:
- lib/pgbouncerhero/methods/basics.rb
Instance Method Summary collapse
- #clients ⇒ Object
- #conf ⇒ Object
- #databases ⇒ Object
- #lists ⇒ Object
- #pools ⇒ Object
- #reload ⇒ Object
- #shutdown ⇒ Object
- #stats ⇒ Object
- #summary ⇒ Object
- #suspend ⇒ Object
Instance Method Details
#clients ⇒ Object
24 25 26 |
# File 'lib/pgbouncerhero/methods/basics.rb', line 24 def clients connection.exec("SHOW clients") end |
#conf ⇒ Object
27 28 29 |
# File 'lib/pgbouncerhero/methods/basics.rb', line 27 def conf connection.exec("SHOW config") end |
#databases ⇒ Object
12 13 14 |
# File 'lib/pgbouncerhero/methods/basics.rb', line 12 def databases connection.exec("SHOW databases") end |
#lists ⇒ Object
18 19 20 |
# File 'lib/pgbouncerhero/methods/basics.rb', line 18 def lists connection.exec("SHOW lists") end |
#pools ⇒ Object
21 22 23 |
# File 'lib/pgbouncerhero/methods/basics.rb', line 21 def pools connection.exec("SHOW pools") end |
#reload ⇒ Object
30 31 32 |
# File 'lib/pgbouncerhero/methods/basics.rb', line 30 def reload connection.exec("RELOAD") end |
#shutdown ⇒ Object
36 37 38 |
# File 'lib/pgbouncerhero/methods/basics.rb', line 36 def shutdown connection.exec("SHUTDOWN") end |
#stats ⇒ Object
15 16 17 |
# File 'lib/pgbouncerhero/methods/basics.rb', line 15 def stats connection.exec("SHOW stats") end |
#summary ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/pgbouncerhero/methods/basics.rb', line 4 def summary l = lists d = databases l = l.as_json d = d.as_json.reject { |a| a['name'] == 'pgbouncer' } l.push({databases_details: d}) l end |
#suspend ⇒ Object
33 34 35 |
# File 'lib/pgbouncerhero/methods/basics.rb', line 33 def suspend connection.exec("SUSPEND") end |