OpenASIP
2.0
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
Functions
a
b
c
d
f
g
i
l
m
n
o
p
s
Variables
Typedefs
a
b
c
d
e
f
i
n
p
r
s
t
Enumerations
Enumerator
b
c
f
g
h
i
l
m
o
r
s
t
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
z
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
v
w
x
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
f
i
j
l
m
n
o
p
r
s
t
u
w
Enumerations
Enumerator
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
tools
RelationalDBConnection.cc
Go to the documentation of this file.
1
/*
2
Copyright (c) 2002-2014 Tampere University.
3
4
This file is part of TTA-Based Codesign Environment (TCE).
5
6
Permission is hereby granted, free of charge, to any person obtaining a
7
copy of this software and associated documentation files (the "Software"),
8
to deal in the Software without restriction, including without limitation
9
the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
and/or sell copies of the Software, and to permit persons to whom the
11
Software is furnished to do so, subject to the following conditions:
12
13
The above copyright notice and this permission notice shall be included in
14
all copies or substantial portions of the Software.
15
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
DEALINGS IN THE SOFTWARE.
23
*/
24
/**
25
* @file RelationalDBConnection.cc
26
*
27
* Empty implementation of the interface, just to be able to add Doxygen
28
* comments for methods.
29
*
30
* @author Pekka Jääskeläinen 2004 (pekka.jaaskelainen-no.spam-tut.fi)
31
*
32
* @note rating: red
33
*/
34
35
#include "
RelationalDBConnection.hh
"
36
37
/**
38
* Destructor.
39
*/
40
RelationalDBConnection::~RelationalDBConnection
() {
41
}
42
43
/**
44
* Performs a query that changes the database (UPDATE/INSERT/DELETE).
45
*
46
* Does not autocommit the changes in case the update is in the middle of
47
* transaction.
48
*
49
* @param queryString The query string.
50
* @return Number of rows affected by the change.
51
* @exception RelationalDBException In case a database error occured.
52
*/
53
int
54
RelationalDBConnection::updateQuery
(
const
std::string&) {
55
return
0;
56
}
57
58
/**
59
* Performs a SQL Data Definition Language query, that is a query that may
60
* change the structure of the database (CREATE TABLE, etc.).
61
*
62
* Does not autocommit the changes in case the update is in the middle of
63
* transaction.
64
*
65
* @param queryString The query string.
66
* @exception RelationalDBException In case a database error occured.
67
*/
68
void
69
RelationalDBConnection::DDLQuery
(
const
std::string&) {}
70
71
/**
72
* Performs a data retrieval query (SELECT).
73
*
74
* @param queryString The query string.
75
* @return A handle to the query result set. Caller owns the instance. Deleting
76
* the instance should free all resources connected to the query.
77
* @exception RelationalDBException In case a database error occured.
78
*/
79
RelationalDBQueryResult
*
80
RelationalDBConnection::query
(
const
std::string&,
bool
/*init*/
) {
81
return
NULL;
82
}
83
84
/**
85
* Starts a new database transaction.
86
*
87
* Also ends the possible previous transaction successfully (commit).
88
*
89
* @exception RelationalDBException In case a database error occured.
90
*/
91
void
92
RelationalDBConnection::beginTransaction
() {}
93
94
/**
95
* Ends the current database transaction unsuccessfully and rollbacks all
96
* the changes the queries in the transaction would have done.
97
*
98
* @exception RelationalDBException In case a database error occured.
99
*/
100
void
101
RelationalDBConnection::rollback
() {}
102
103
/**
104
* Ends the current database transaction successfully and commits all
105
* the changes in the transaction to the database.
106
*
107
* @exception RelationalDBException In case a database error occured.
108
*/
109
void
110
RelationalDBConnection::commit
() {}
111
112
/**
113
* Checks if database has given table by name.
114
*
115
* @param tableName Name of the table
116
* @return True if db has the table. Otherwise false.
117
* @exception RelationalDBException In case a database error occurred or
118
* call was made in the middle of an active
119
* transaction.
120
*/
121
bool
122
RelationalDBConnection::tableExistsInDB
(
const
std::string&) {
123
return
false
;
124
}
125
126
/**
127
* Return number of entries in the given table.
128
*
129
* @param tableName Name of the table.
130
* @return Number of entries in table.
131
* @exception RelationalDBException In case a database error occurred,
132
* call was made in the middle of an active transaction or the table does not
133
* exists.
134
*/
135
int
136
RelationalDBConnection::rowCountInTable
(
const
std::string&) {
137
return
false
;
138
}
139
140
/**
141
* Return database version number.
142
*
143
* @return Database version.
144
*/
145
int
146
RelationalDBConnection::version
() {
147
return
0;
148
}
149
150
/**
151
* Set database version number.
152
*
153
* @param version New database version.
154
*/
155
void
156
RelationalDBConnection::updateVersion
(
int
version) {
157
(void)
version
;
158
}
RelationalDBConnection::rollback
virtual void rollback()=0
Definition:
RelationalDBConnection.cc:101
RelationalDBConnection::updateQuery
virtual int updateQuery(const std::string &queryString)=0
Definition:
RelationalDBConnection.cc:54
RelationalDBConnection::commit
virtual void commit()=0
Definition:
RelationalDBConnection.cc:110
RelationalDBConnection::~RelationalDBConnection
virtual ~RelationalDBConnection()
Definition:
RelationalDBConnection.cc:40
RelationalDBConnection::version
virtual int version()=0
Definition:
RelationalDBConnection.cc:146
RelationalDBConnection::updateVersion
virtual void updateVersion(int version)=0
Definition:
RelationalDBConnection.cc:156
RelationalDBQueryResult
Definition:
RelationalDBQueryResult.hh:46
RelationalDBConnection::query
virtual RelationalDBQueryResult * query(const std::string &queryString, bool init=true)=0
Definition:
RelationalDBConnection.cc:80
RelationalDBConnection::beginTransaction
virtual void beginTransaction()=0
Definition:
RelationalDBConnection.cc:92
RelationalDBConnection.hh
RelationalDBConnection::rowCountInTable
virtual int rowCountInTable(const std::string &tableName)=0
Definition:
RelationalDBConnection.cc:136
RelationalDBConnection::DDLQuery
virtual void DDLQuery(const std::string &queryString)=0
Definition:
RelationalDBConnection.cc:69
RelationalDBConnection::tableExistsInDB
virtual bool tableExistsInDB(const std::string &tableName)=0
Definition:
RelationalDBConnection.cc:122
Generated by
1.8.17