libdballe
5.18
Main Page
Modules
Data Structures
Files
File List
Globals
dballe
db
attr.h
Go to the documentation of this file.
1
/*
2
* db/attr - attr table management
3
*
4
* Copyright (C) 2005--2010 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_ATTR_H
23
#define DBALLE_DB_ATTR_H
24
31
#include <
dballe/db/odbcworkarounds.h
>
32
#include <wreport/var.h>
33
#include <sqltypes.h>
34
#include <cstdio>
35
36
namespace
dballe {
37
struct
DB;
38
39
namespace
db {
40
struct
Connection;
41
struct
Statement;
42
46
struct
Attr
47
{
49
db::Connection
&
conn
;
50
52
db::Statement
*
sstm
;
54
db::Statement
*
istm
;
56
db::Statement
*
rstm
;
57
59
DBALLE_SQL_C_SINT_TYPE
id_context
;
61
wreport::Varcode
id_var
;
63
wreport::Varcode
type
;
65
char
value
[255];
67
SQLLEN
value_ind
;
68
69
Attr
(
Connection
&
conn
);
70
~
Attr
();
71
78
void
set
(
const
wreport::Var& var);
79
86
void
set_value
(
const
char
*
value
);
87
96
void
insert
(
bool
replace);
97
106
void
load
(wreport::Var& var);
107
111
void
dump
(FILE* out);
112
113
private
:
114
// disallow copy
115
Attr
(
const
Attr
&);
116
Attr
& operator=(
const
Attr
&);
117
};
118
119
}
// namespace db
120
}
// namespace dballe
121
122
/* vim:set ts=4 sw=4: */
123
#endif
Generated on Wed Mar 19 2014 05:22:59 for libdballe by
1.8.1.2