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