Class: Webhookdb::Postgres::Maintenance::Query

Inherits:
Base
  • Object
show all
Defined in:
lib/webhookdb/postgres/maintenance.rb

Direct Known Subclasses

Count, Tables

Instance Attribute Summary

Attributes inherited from Base

#service_integration

Instance Method Summary collapse

Methods inherited from Base

#conn_params, #debug?, #initialize

Constructor Details

This class inherits a constructor from Webhookdb::Postgres::Maintenance::Base

Instance Method Details

#connstrObject



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

#fetchObject



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

#queryObject

Raises:

  • (NotImplementedError)


46
# File 'lib/webhookdb/postgres/maintenance.rb', line 46

def query = raise NotImplementedError

#runObject

Raises:

  • (NotImplementedError)


54
# File 'lib/webhookdb/postgres/maintenance.rb', line 54

def run = raise NotImplementedError

#run_fmtObject

Raises:

  • (NotImplementedError)


55
# File 'lib/webhookdb/postgres/maintenance.rb', line 55

def run_fmt = raise NotImplementedError