feat: ✨ begin work on everything :P
This commit is contained in:
parent
03b77c7395
commit
dca5944549
6 changed files with 445 additions and 6 deletions
21
lib/timeseries/hoarder/TimeseriesDatabase.rb
Normal file
21
lib/timeseries/hoarder/TimeseriesDatabase.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
require 'pg'
|
||||
|
||||
require_relative 'CachingTable.rb'
|
||||
|
||||
module Timeseries
|
||||
module Hoarder
|
||||
class Database
|
||||
attr_reader :pg
|
||||
attr_reader :data_sources
|
||||
|
||||
def initialize(pg)
|
||||
@pg = pg
|
||||
|
||||
@pg.exec("CREATE SCHEMA IF NOT EXISTS ts_hoarder")
|
||||
|
||||
@data_sources = CachingTable.new(self, 'sources', 'source')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue