libdballe  7.6
mysql/datav6.h
Go to the documentation of this file.
1 /*
2  * db/mysql/data - data table management
3  *
4  * Copyright (C) 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_MYSQL_V6_DATA_H
23 #define DBALLE_DB_MYSQL_V6_DATA_H
24 
31 #include <dballe/db/sql/datav6.h>
32 #include <dballe/db/mysql/internals.h>
33 
34 namespace dballe {
35 struct Record;
36 
37 namespace db {
38 namespace mysql {
39 struct DB;
40 
44 class MySQLDataV6 : public sql::DataV6
45 {
46 protected:
49 
50 public:
52  MySQLDataV6(const MySQLDataV6&) = delete;
53  MySQLDataV6(const MySQLDataV6&&) = delete;
54  MySQLDataV6& operator=(const MySQLDataV6&) = delete;
55  ~MySQLDataV6();
56 
57  void insert(Transaction& t, sql::bulk::InsertV6& vars, UpdateMode update_mode=UPDATE) override;
58  void remove(const v6::QueryBuilder& qb) override;
59  void dump(FILE* out) override;
60 };
61 
62 }
63 }
64 }
65 #endif
Database connection.
Definition: mysql/internals.h:145
void insert(Transaction &t, sql::bulk::InsertV6 &vars, UpdateMode update_mode=UPDATE) override
Bulk variable insert.
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
Attribute table management used by the db module.
void dump(FILE *out) override
Dump the entire contents of the table to an output stream.
A RAII transaction interface.
Definition: sql.h:134
Input for a bulk insert of a lot of variables sharing the same context information.
Definition: sql/datav6.h:133
Precompiled query to manipulate the data table.
Definition: mysql/datav6.h:44
MySQLConnection & conn
DB connection.
Definition: mysql/datav6.h:48
Build SQL queries for V6 databases.
Definition: qbuilder.h:15
Precompiled query to manipulate the data table.
Definition: sql/datav6.h:57