COOPY » Guide
version 0.6.5
|
Compare or resolve differences between a set of databases. More...
#include <BookCompare.h>
Public Member Functions | |
int | create (coopy::store::TextBook &local, Patcher &output, const CompareFlags &flags) |
int | compare (coopy::store::TextBook &pivot, coopy::store::TextBook &local, coopy::store::TextBook &remote, Patcher &output, const CompareFlags &flags) |
int | resolve (coopy::store::TextBook &pivot, coopy::store::TextBook &local, coopy::store::TextBook &remote, Patcher &output, const CompareFlags &flags) |
void | setVerbose (bool verbose) |
Compare or resolve differences between a set of databases.
Definition at line 18 of file BookCompare.h.
int BookCompare::compare | ( | coopy::store::TextBook & | pivot, |
coopy::store::TextBook & | local, | ||
coopy::store::TextBook & | remote, | ||
Patcher & | output, | ||
const CompareFlags & | flags | ||
) |
Definition at line 59 of file BookCompare.cpp.
References coopy::cmp::Patcher::addSheet(), coopy::cmp::SheetCompare::compare(), dbg_printf, coopy::store::TextBook::getNames(), coopy::store::PolySheet::isValid(), coopy::store::TextBook::isValid(), coopy::cmp::CompareFlags::mapping, coopy::cmp::CompareFlags::mapping_book, coopy::cmp::Patcher::mergeAllDone(), coopy::cmp::Patcher::mergeDone(), coopy::cmp::Patcher::mergeStart(), coopy::store::TextBook::namedSheets(), NULL, coopy::store::TextBook::readSheet(), coopy::store::TextBook::readSheetByIndex(), coopy::cmp::Patcher::removeSheet(), coopy::cmp::Patcher::setFlags(), coopy::cmp::CompareFlags::tables, and coopy::store::TextBook::tail().
Referenced by coopy::app::Diff::apply(), coopy::app::Coopy::compare(), csv_merge(), csvs_diff(), WideSheetManager::diffSheet(), coopy::app::Coopy::merge(), and WideSheetManager::mergeToLocal().
int BookCompare::create | ( | coopy::store::TextBook & | local, |
Patcher & | output, | ||
const CompareFlags & | flags | ||
) |
Definition at line 17 of file BookCompare.cpp.
References coopy::cmp::Patcher::addPoolsFromFlags(), coopy::cmp::Patcher::addPoolsFromSchema(), coopy::cmp::RowChange::allNames, coopy::store::PolySheet::cellSummary(), coopy::cmp::Patcher::changeName(), coopy::cmp::Patcher::changeRow(), coopy::cmp::NameChange::constant, coopy::cmp::NameChange::final, coopy::store::TextBook::getNames(), coopy::store::PolySheet::height(), coopy::cmp::NameChange::loud, coopy::cmp::Patcher::mergeAllDone(), coopy::cmp::Patcher::mergeDone(), coopy::cmp::Patcher::mergeStart(), coopy::cmp::RowChange::mode, coopy::cmp::NameChange::mode, coopy::cmp::NAME_CHANGE_DECLARE, coopy::cmp::RowChange::names, coopy::cmp::NameChange::names, coopy::cmp::CompareFlags::pool, coopy::store::TextBook::readSheet(), coopy::cmp::ROW_CHANGE_INSERT, coopy::cmp::Patcher::setSheet(), coopy::store::NameSniffer::suggestColumnName(), coopy::cmp::RowChange::val, and coopy::store::PolySheet::width().
int BookCompare::resolve | ( | coopy::store::TextBook & | pivot, |
coopy::store::TextBook & | local, | ||
coopy::store::TextBook & | remote, | ||
Patcher & | output, | ||
const CompareFlags & | flags | ||
) |
Definition at line 242 of file BookCompare.cpp.
References coopy::cmp::RowChange::allNames, cc, coopy::store::PolySheet::cellString(), coopy::store::PolySheet::cellSummary(), coopy::cmp::Patcher::changeColumn(), coopy::cmp::Patcher::changeName(), coopy::cmp::Patcher::changeRow(), coopy::cmp::RowChange::cond, coopy::cmp::NameChange::constant, coopy::cmp::NameChange::final, coopy::store::SheetSchema::getColumnCount(), coopy::store::SheetSchema::getColumnIndexByName(), coopy::store::SheetSchema::getColumnInfo(), coopy::store::ColumnInfo::getName(), coopy::store::TextBook::getNames(), coopy::store::PolySheet::getSchema(), coopy::store::PolySheet::height(), coopy::store::PolySheet::hideHeaders(), coopy::cmp::RowChange::indexes, coopy::cmp::OrderChange::indicesAfter, coopy::cmp::OrderChange::indicesBefore, coopy::store::PolySheet::isValid(), coopy::cmp::Patcher::mergeAllDone(), coopy::cmp::Patcher::mergeDone(), coopy::cmp::Patcher::mergeStart(), coopy::cmp::RowChange::mode, coopy::cmp::OrderChange::mode, coopy::cmp::NameChange::mode, coopy::store::PolySheet::mustHaveSchema(), coopy::cmp::NAME_CHANGE_DECLARE, coopy::cmp::RowChange::names, coopy::cmp::NameChange::names, coopy::cmp::OrderChange::namesAfter, coopy::cmp::OrderChange::namesBefore, coopy::cmp::ORDER_CHANGE_DELETE, coopy::store::TextBook::readSheetByIndex(), coopy::cmp::CompareFlags::resolve, coopy::cmp::ROW_CHANGE_UPDATE, coopy::cmp::Patcher::setFlags(), coopy::cmp::Patcher::setSheet(), coopy::cmp::OrderChange::subject, coopy::store::IndexSniffer::suggestIndexes(), coopy::cmp::RowChange::val, and coopy::store::PolySheet::width().
Referenced by coopy::app::Diff::apply().
void BookCompare::setVerbose | ( | bool | verbose | ) |
Definition at line 197 of file BookCompare.cpp.
References _csv_verbose.
Referenced by coopy::app::Diff::apply().