summaryrefslogtreecommitdiff
path: root/lib/row.h
blob: 35d8bcdaeccbe2707ab599855bf604b5859b8214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef MYGRATE_ROW_H
#define MYGRATE_ROW_H

#include "dbTypes.h"
#include <utility>
#include <vector>
namespace MyGrate {
	class RawDataReader;
}
struct st_mariadb_rpl_rows_event;
struct st_mariadb_rpl_table_map_event;

namespace MyGrate {
	class Row : public std::vector<DbValue> {
	public:
		Row(const st_mariadb_rpl_rows_event &, const st_mariadb_rpl_table_map_event &);

	private:
		friend class RowPair;
		Row(const st_mariadb_rpl_rows_event &, const st_mariadb_rpl_table_map_event &, MyGrate::RawDataReader && md,
				MyGrate::RawDataReader && data);
		Row(const st_mariadb_rpl_rows_event &, const st_mariadb_rpl_table_map_event &, MyGrate::RawDataReader & md,
				MyGrate::RawDataReader & data);
	};

	class RowPair : public std::pair<Row, Row> {
	public:
		RowPair(const st_mariadb_rpl_rows_event &, const st_mariadb_rpl_table_map_event &);

	private:
		RowPair(const st_mariadb_rpl_rows_event &, const st_mariadb_rpl_table_map_event &,
				MyGrate::RawDataReader && md1, MyGrate::RawDataReader && md2, MyGrate::RawDataReader && data);
	};
}

#endif