COOPY » Guide
version 0.6.5
|
00001 #ifndef COOPY_MERGEOUTPUTSQLDIFF 00002 #define COOPY_MERGEOUTPUTSQLDIFF 00003 00004 #include <coopy/MergeOutput.h> 00005 #include <coopy/Dbg.h> 00006 00007 #include <string> 00008 00009 namespace coopy { 00010 namespace cmp { 00011 class SqlText; 00012 class MergeOutputSqlDiff; 00013 } 00014 } 00015 00016 class coopy::cmp::SqlText { 00017 public: 00018 std::string name; 00019 std::string vals; 00020 std::string conds; 00021 std::string val_columns; 00022 std::string val_values; 00023 }; 00024 00025 class coopy::cmp::MergeOutputSqlDiff : public MergeOutput { 00026 private: 00027 std::string sheet_name; 00028 public: 00029 MergeOutputSqlDiff() { 00030 sheet_name = coopy_get_default_table_name(); 00031 } 00032 00033 virtual bool wantDiff() { return true; } 00034 virtual bool changeColumn(const OrderChange& change); 00035 virtual bool changeRow(const RowChange& change); 00036 00037 virtual bool setSheet(const char *name) { 00038 sheet_name = name; 00039 return true; 00040 } 00041 00042 static SqlText getText(const RowChange& change, const char *sheet_name, 00043 const CompareFlags *flags = NULL); 00044 }; 00045 00046 #endif