-
Notifications
You must be signed in to change notification settings - Fork 0
/
TableCompareStream.h
41 lines (30 loc) · 1.28 KB
/
TableCompareStream.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
/*----------------------------------------------------------------------
Copyright (c) Dan Petitt, http://www.coderanger.com
All Rights Reserved.
Please see the file "licence.txt" for licencing details.
File: TableCompareStream.h
Owner: [email protected]
Purpose: Derived table syncronisation class which loads up all data
into memory and analyses differences between the two databases
Advantages: It works
Disadvantages: It uses a lot of memory (hence only really use
this on a 64 bit machine in 64 bit mode)
----------------------------------------------------------------------*/
#pragma once
#include "TableCompareABC.h"
class CTableCompareStream : public CTableCompareABC
{
public:
CTableCompareStream(void);
~CTableCompareStream(void);
protected:
virtual void OnProcessTable( const XMySQL::CConnection::Table &tbl );
private:
std::string BuildDifferentFieldValues( const CTableCompareABC::Record &rec );
std::string BuildBulkInsertFieldValues( const CTableCompareABC::Record &rec );
std::string BuildWhereClauseForKeys( const CTableCompareABC::Record &rec );
std::string BuildWhereClauseForKeys( const XMySQL::CResultSet &rs );
private:
CTableCompareStream( const CTableCompareStream & );
CTableCompareStream & operator = ( const CTableCompareStream & );
};