1 #ifndef DBALLE_DB_V6_LEVTR_H
2 #define DBALLE_DB_V6_LEVTR_H
57 virtual void read_all(std::function<
void(
const DBRow&)> dest) = 0;
60 virtual void dump(FILE* out) = 0;
91 virtual void dump(FILE* out)
const = 0;
94 static std::unique_ptr<LevTrCache>
create(
LevTr& levtr);
Store an array of physical data all on the same level.
Definition: context.h:44
int l1
Level L1 SQL parameter.
Definition: v6/levtr.h:32
Storage for related physical data.
Definition: msg.h:70
virtual void dump(FILE *out)=0
Dump the entire contents of the table to an output stream.
virtual msg::Context * to_msg(int id, Msg &msg)=0
Get/create a Context in the Msg for this level/timerange.
int p1
Time range P1 SQL parameter.
Definition: v6/levtr.h:40
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:587
virtual const DBRow * read(int id)=0
Read the LevTr data for an id, returns nullptr if not found.
Key/value store where keys are strings and values are wreport variables.
Definition: record.h:17
virtual bool to_rec(int id, Record &rec)=0
Fill a record with level/timerange info with this id.
int id
lev_tr ID SQL parameter
Definition: v6/levtr.h:28
int l2
Level L2 SQL parameter.
Definition: v6/levtr.h:36
int ltype2
Second level type SQL parameter.
Definition: v6/levtr.h:34
virtual Level to_level(int id) const =0
Return a Level for this ID.
Definition: v6/levtr.h:63
Vertical level or layer.
Definition: types.h:532
virtual void dump(FILE *out) const =0
Dump cache contents to an output stream.
Definition: v6/levtr.h:25
virtual void read_all(std::function< void(const DBRow &)> dest)=0
Read the contents of the LevTr table.
Precompiled queries to manipulate the lev_tr table.
Definition: v6/levtr.h:23
int pind
Time range type SQL parameter.
Definition: v6/levtr.h:38
static std::unique_ptr< LevTrCache > create(LevTr &levtr)
Create a new LevTrCache for this LevTr.
virtual Trange to_trange(int id) const =0
Return a Trange for this ID.
virtual void invalidate()=0
Invalidate the cache.
int p2
Time range P2 SQL parameter.
Definition: v6/levtr.h:42
int ltype1
First level type SQL parameter.
Definition: v6/levtr.h:30
virtual int obtain_id(const Level &lev, const Trange &tr)=0
Return the ID for the given Level and Trange, adding it to the database if it does not already exist...