22 #ifndef DBALLE_DB_SQL_LEVTR_H
23 #define DBALLE_DB_SQL_LEVTR_H
80 virtual void read_all(std::function<
void(
const DBRow&)> dest) = 0;
83 virtual void dump(FILE* out) = 0;
114 virtual void dump(FILE* out)
const = 0;
117 static std::unique_ptr<LevTrCache>
create(
LevTr& levtr);
Store an array of physical data all on the same level.
Definition: context.h:44
int pind
Time range type SQL parameter.
Definition: db/sql/levtr.h:61
Definition: db/sql/levtr.h:48
static std::unique_ptr< LevTrCache > create(LevTr &levtr)
Create a new LevTrCache for this LevTr.
Storage for related physical data.
Definition: msg.h:133
int ltype1
First level type SQL parameter.
Definition: db/sql/levtr.h:53
virtual void invalidate()=0
Invalidate the cache.
virtual void dump(FILE *out) const =0
Dump cache contents to an output stream.
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:565
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...
Key/value store where keys are strings and values are wreport variables.
Definition: record.h:16
int ltype2
Second level type SQL parameter.
Definition: db/sql/levtr.h:57
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
int p2
Time range P2 SQL parameter.
Definition: db/sql/levtr.h:65
virtual const DBRow * read(int id)=0
Read the LevTr data for an id, returns nullptr if not found.
int l1
Level L1 SQL parameter.
Definition: db/sql/levtr.h:55
Vertical level or layer.
Definition: types.h:515
virtual msg::Context * to_msg(int id, Msg &msg)=0
Get/create a Context in the Msg for this level/timerange.
Definition: db/sql/levtr.h:86
virtual Level to_level(int id) const =0
Return a Level for this ID.
int id
lev_tr ID SQL parameter
Definition: db/sql/levtr.h:51
virtual void dump(FILE *out)=0
Dump the entire contents of the table to an output stream.
virtual Trange to_trange(int id) const =0
Return a Trange for this ID.
int p1
Time range P1 SQL parameter.
Definition: db/sql/levtr.h:63
virtual void read_all(std::function< void(const DBRow &)> dest)=0
Read the contents of the LevTr table.
int l2
Level L2 SQL parameter.
Definition: db/sql/levtr.h:59
Precompiled queries to manipulate the lev_tr table.
Definition: db/sql/levtr.h:46
virtual bool to_rec(int id, Record &rec)=0
Fill a record with level/timerange info with this id.