Beispiel #1
0
std::shared_ptr<storage::AbstractTable> Loader::shortcuts::loadRaw(const std::string& file) {
  RawTableLoader input(file);
  CSVHeader header(file);

  Loader::params p;
  p.setInput(input);
  p.setHeader(header);
  p.setReturnsMutableVerticalTable(false);
  return Loader::load(p);
}
Beispiel #2
0
Loader::params *Loader::params::clone() const {
  Loader::params *p = new Loader::params();
  if (Input != nullptr) p->setInput(*Input);
  if (Header != nullptr) p->setHeader(*Header);
  p->setBasePath(BasePath);
  p->setFactory(Factory);
  p->setInsertOnly(InsertOnly);
  p->setReturnsMutableVerticalTable(ReturnsMutableVerticalTable);
  p->setModifiableMutableVerticalTable(ModifiableMutableVerticalTable);
  p->setReferenceTable(ReferenceTable);
  p->setCompressed(Compressed);
  return p;
}
Beispiel #3
0
std::shared_ptr<storage::Store> Loader::shortcuts::loadMainDelta(const std::string& mainfilepath,
                                                                 const std::string& deltafilepath,
                                                                 Loader::params p) {
  std::vector<std::string> filenames;
  filenames.push_back(mainfilepath);
  filenames.push_back(deltafilepath);
  std::vector<std::shared_ptr<storage::AbstractTable>> tables;

  for (int i = 0; i < 2; ++i) {
    CSVInput input(filenames[i]);
    CSVHeader header(filenames[i]);

    p.setInput(input);
    p.setHeader(header);
    p.setReturnsMutableVerticalTable(true);
    std::shared_ptr<storage::AbstractTable> table = load(p);
    tables.push_back(table);
  }
  auto s = std::make_shared<storage::Store>(tables[0]);
  s->setDelta(tables[1]);
  return s;
};