libdballe
7.21
dballe
db
v7
postgresql
v7/postgresql/levtr.h
1
#ifndef DBALLE_DB_V7_POSTGRESQL_LEVTRV7_H
2
#define DBALLE_DB_V7_POSTGRESQL_LEVTRV7_H
3
4
#include <
dballe/db/db.h
>
5
#include <dballe/db/v7/levtr.h>
6
#include <
dballe/sql/fwd.h
>
7
#include <cstdio>
8
#include <memory>
9
10
namespace
dballe
{
11
struct
Record;
12
struct
Msg;
13
14
namespace
msg {
15
struct
Context;
16
}
17
18
namespace
db {
19
namespace
v7 {
20
namespace
postgresql {
21
struct
DB;
22
26
struct
PostgreSQLLevTr
:
public
v7::LevTr
27
{
28
protected
:
29
dballe::sql::PostgreSQLConnection
& conn;
30
31
void
_dump(std::function<
void
(
int
,
const
Level
&,
const
Trange
&)> out)
override
;
32
33
public
:
34
PostgreSQLLevTr
(
dballe::sql::PostgreSQLConnection
& conn);
35
PostgreSQLLevTr
(
const
LevTr
&) =
delete
;
36
PostgreSQLLevTr
(
const
LevTr
&&) =
delete
;
37
PostgreSQLLevTr
& operator=(
const
PostgreSQLLevTr
&) =
delete
;
38
~
PostgreSQLLevTr
();
39
40
void
prefetch_ids(
const
std::set<int>& ids, std::function<
void
(
int
,
const
LevTrDesc
&)> dest)
override
;
41
void
prefetch_same_level(
int
id
, std::function<
void
(
int
,
const
LevTrDesc
&)> dest)
override
;
42
levtrs_t::iterator lookup_id(
State
& st,
int
id
)
override
;
43
levtrs_t::iterator obtain_id(
State
& state,
const
LevTrDesc
& desc)
override
;
44
};
45
46
47
}
48
}
49
}
50
}
51
#endif
dballe::sql::PostgreSQLConnection
Database connection.
Definition:
postgresql.h:239
dballe::db::v7::State
Cache intermediate results during a database transaction, to avoid hitting the database multiple time...
Definition:
state.h:140
dballe::Trange
Information on how a value has been sampled or computed with regards to time.
Definition:
types.h:587
fwd.h
Forward declarations for public dballe/sql names.
dballe
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition:
cmdline.h:17
dballe::db::v7::postgresql::PostgreSQLLevTr
Precompiled queries to manipulate the lev_tr table.
Definition:
v7/postgresql/levtr.h:26
dballe::Level
Vertical level or layer.
Definition:
types.h:532
db.h
Functions used to connect to DB-All.e and insert, query and delete data.
dballe::db::v7::LevTr
Precompiled queries to manipulate the lev_tr table.
Definition:
v7/levtr.h:24
dballe::db::v7::LevTrDesc
Definition:
state.h:58
Generated by
1.8.12