示例#1
0
bool SimpleTableDump::dump(std::string name, std::shared_ptr<AbstractTable> table) {
  verify(table);
  auto mainTable = std::dynamic_pointer_cast<Store>(table)->getMainTables()[0];
  prepare(name);
  for(size_t i=0; i < mainTable->columnCount(); ++i) {
    // For each attribute dump dictionary and values
    dumpDictionary(name, mainTable, i);
    dumpAttribute(name, mainTable, i);
  }

  dumpHeader(name, mainTable);
  dumpMetaData(name, mainTable);
  
  return true;
}
示例#2
0
bool SimpleTableDump::dumpDelta(std::string name, atable_ptr_t table) {
  verify(table);
  auto deltaTable = std::dynamic_pointer_cast<Store>(table)->getDeltaTable();
  prepare(name);
  for (size_t i = 0; i < deltaTable->columnCount(); ++i) {
    // For each attribute dump dictionary and values
    dumpDictionary(name, deltaTable, i, true);
    dumpAttribute(name, deltaTable, i);
  }

  dumpHeader(name, deltaTable);
  dumpMetaData(name, deltaTable);

  return true;
}