-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrow.h
47 lines (40 loc) · 935 Bytes
/
row.h
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
37
38
39
40
41
42
43
44
45
46
47
#ifndef ROW_H
#define ROW_H
#include <stdint.h>
#include <stdio.h>
#include <vector>
#include <string>
#include <assert.h>
#include "config.h"
using std::vector;
using std::string;
enum EnumAction
{
INSERT,
UPDATE,
DEL
};
/*
*@todo 存储解析后的行数据
*/
class Row
{
public:
Row() {};
~Row() {};
int Init(EnumAction eAction, string sDatabaseName, string sTableName);
int PushBack(char *pBuf, bool bOld);
int PushBack(string sBuf, bool bOld);
int PushBack(char *pBuf, uint32_t uLen, bool bOld);
string& GetColumnByIndex(uint32_t uIndex, bool bOld);
int FilterCopy(Row *pRow);
int Print();
public:
EnumAction m_eAction;
vector<string> m_vColumn;
vector<string> m_vOldColumn;
string m_sDatabaseName;
string m_sTableName;
string m_sTemp;
};
#endif