OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Serializer Struct Reference

#include <Serializer.h>

Static Public Member Functions

static std::string serializeRelAlgDag (const RelAlgDag &rel_alg_dag)
 
static std::unique_ptr< RelAlgDagdeserializeRelAlgDag (const std::string &serialized_dag_str)
 

Detailed Description

Definition at line 21 of file Serializer.h.

Member Function Documentation

std::unique_ptr< RelAlgDag > Serializer::deserializeRelAlgDag ( const std::string &  serialized_dag_str)
static

Deserializes a RelAlgDag, completing a full rebuild of the Dag. This is only supported before query execution.

Parameters
serialized_dag_strThe RelAlgDag serialization string, output from the about serializeRelAlgDag() method.

Definition at line 36 of file Serializer.cpp.

37  {
38  auto rel_alg_dag = std::make_unique<RelAlgDag>();
39  std::stringstream ss(serialized_dag_str);
40  // read data from archive
41  {
42  boost::archive::text_iarchive ia(ss);
43  ia >> *rel_alg_dag;
44  // archive and stream closed when destructors are called
45  }
46  return rel_alg_dag;
47 }
std::string Serializer::serializeRelAlgDag ( const RelAlgDag rel_alg_dag)
static

Serializes a complete RelAlgDag into a string. Serialization is only supported before query execution

Parameters
rel_alg_dagThe RelAlgDag instance to serialize.

Definition at line 24 of file Serializer.cpp.

24  {
25  std::stringstream ss;
26  // save data to archive
27  {
28  boost::archive::text_oarchive oa(ss);
29  // write class instance to archive
30  oa << rel_alg_dag;
31  // archive and stream closed when destructors are called
32  }
33  return ss.str();
34 }

The documentation for this struct was generated from the following files: