libdballe
7.7
Main Page
Modules
Namespaces
Data Structures
Files
File List
Globals
dballe
db
postgresql
db/postgresql/levtr.h
1
/*
2
* db/lev_tr - lev_tr table management
3
*
4
* Copyright (C) 2005--2015 ARPA-SIM <urpsim@smr.arpa.emr.it>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
*
19
* Author: Enrico Zini <enrico@enricozini.com>
20
*/
21
22
#ifndef DBALLE_DB_POSTGRESQL_LEV_TR_H
23
#define DBALLE_DB_POSTGRESQL_LEV_TR_H
24
25
#include <
dballe/db/db.h
>
26
#include <dballe/db/sql/levtr.h>
27
#include <dballe/db/postgresql/internals.h>
28
#include <cstdio>
29
#include <memory>
30
31
namespace
dballe
{
32
struct
Record;
33
struct
Msg;
34
35
namespace
msg {
36
struct
Context;
37
}
38
39
namespace
db {
40
struct
Connection;
41
struct
Statement;
42
43
namespace
postgresql {
44
struct
DB;
45
49
struct
PostgreSQLLevTrV6
:
public
sql::LevTr
50
{
51
protected
:
55
PostgreSQLConnection
&
conn
;
56
57
DBRow
working_row;
58
59
public
:
60
PostgreSQLLevTrV6
(
PostgreSQLConnection
& conn);
61
PostgreSQLLevTrV6
(
const
LevTr&) =
delete
;
62
PostgreSQLLevTrV6
(
const
LevTr&&) =
delete
;
63
PostgreSQLLevTrV6
& operator=(
const
PostgreSQLLevTrV6
&) =
delete
;
64
~
PostgreSQLLevTrV6
();
65
70
int
obtain_id(
const
Level
& lev,
const
Trange
& tr)
override
;
71
72
const
DBRow
* read(
int
id
)
override
;
73
void
read_all(std::function<
void
(
const
DBRow
&)> dest)
override
;
74
78
void
dump(FILE* out)
override
;
79
};
80
81
82
}
83
}
84
}
85
#endif
dballe::db::sql::LevTr::DBRow
Definition:
db/sql/levtr.h:48
dballe::Trange
Information on how a value has been sampled or computed with regards to time.
Definition:
types.h:565
dballe::db::postgresql::PostgreSQLLevTrV6
Precompiled queries to manipulate the lev_tr table.
Definition:
db/postgresql/levtr.h:49
dballe
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition:
cmdline.h:17
dballe::Level
Vertical level or layer.
Definition:
types.h:515
db.h
Functions used to connect to DB-All.e and insert, query and delete data.
dballe::db::postgresql::PostgreSQLLevTrV6::conn
PostgreSQLConnection & conn
DB connection.
Definition:
db/postgresql/levtr.h:55
dballe::db::PostgreSQLConnection
Database connection.
Definition:
postgresql/internals.h:249
dballe::db::sql::LevTr
Precompiled queries to manipulate the lev_tr table.
Definition:
db/sql/levtr.h:46
Generated by
1.8.11