Class: Webhookdb::Postgres::Maintenance::Query
- Inherits:
-
Base
- Object
- Base
- Webhookdb::Postgres::Maintenance::Query
show all
- Defined in:
- lib/webhookdb/postgres/maintenance.rb
Instance Attribute Summary
Attributes inherited from Base
#service_integration
Instance Method Summary
collapse
Methods inherited from Base
#conn_params, #debug?, #initialize
Instance Method Details
#connstr ⇒ Object
41
42
43
44
|
# File 'lib/webhookdb/postgres/maintenance.rb', line 41
def connstr
h = self.conn_params
return "postgres://#{h[:user]}:#{h[:password]}@#{h[:host]}:#{h[:port]}/#{h[:database]}"
end
|
#fetch ⇒ Object
48
49
50
51
52
|
# File 'lib/webhookdb/postgres/maintenance.rb', line 48
def fetch
Sequel.connect(self.connstr) do |c|
c.fetch(self.query).all
end
end
|
#query ⇒ Object
46
|
# File 'lib/webhookdb/postgres/maintenance.rb', line 46
def query = raise NotImplementedError
|
#run ⇒ Object
54
|
# File 'lib/webhookdb/postgres/maintenance.rb', line 54
def run = raise NotImplementedError
|
#run_fmt ⇒ Object
55
|
# File 'lib/webhookdb/postgres/maintenance.rb', line 55
def run_fmt = raise NotImplementedError
|