1#ifndef CYCLUS_SRC_QUERY_BACKEND_H_ 
    2#define CYCLUS_SRC_QUERY_BACKEND_H_ 
    8#include <boost/version.hpp> 
   10#include <boost/uuid/detail/sha1.hpp> 
   16#define CYCLUS_SHA1_NINT 5 
   18#define CYCLUS_SHA1_SIZE (sizeof(CYCLUS_SHA1_ELEM_TYPE) * CYCLUS_SHA1_NINT) 
   19#define CYCLUS_UUID_SIZE 16 
  403      throw ValueError(
"operation '" + 
op + 
"' not valid for field '" + \
 
 
 
  420typedef std::vector<boost::spirit::hold_any> 
QueryRow;
 
  456  T 
GetVal(std::string field, 
int row = 0) {
 
  458      throw StateError(
"No rows found during query for field " + field);
 
  460    if (row >= 
rows.size()) {
 
  461      throw KeyError(
"index larger than number of query rows for field " 
  466    for (
int i = 0; i < 
fields.size(); ++i) {
 
  472    if (field_idx == -1) {
 
  473      throw KeyError(
"query result has no such field " + field);
 
  476    return rows[row][field_idx].cast<T>();
 
 
 
  483  ColumnInfo(std::string default_table, std::string default_col, 
int default_index,
 
  484             DbTypes default_dbtype, std::vector<int> default_shape) :
 
  486    shape(default_shape) {};
 
 
 
  505  virtual std::map<std::string, DbTypes> 
ColumnTypes(std::string table) = 0;
 
  508  virtual std::list<ColumnInfo> 
Schema(std::string table) = 0;
 
  511  virtual std::set<std::string> 
Tables() = 0;
 
 
  526        to_inject_(to_inject) {}
 
 
  530      return b_->Query(table, &to_inject_);
 
  533    std::vector<Cond> c = *conds;
 
  534    for (
int i = 0; i < to_inject_.size(); ++i) {
 
  535      c.push_back(to_inject_[i]);
 
  537    return b_->Query(table, &c);
 
 
  540  virtual std::map<std::string, DbTypes> 
ColumnTypes(std::string table) {
 
  541    return b_->ColumnTypes(table);
 
 
  544  virtual std::list<ColumnInfo> 
Schema(std::string table) {
 
  545    return b_->Schema(table);
 
 
  548  virtual std::set<std::string> 
Tables() { 
return b_->Tables(); }
 
  552  std::vector<Cond> to_inject_;
 
 
  566    return b_->Query(prefix_ + table, conds);
 
 
  569  virtual std::map<std::string, DbTypes> 
ColumnTypes(std::string table) {
 
  570    return b_->ColumnTypes(table);
 
 
  573  virtual std::list<ColumnInfo> 
Schema(std::string table) {
 
  574    return b_->Schema(table);
 
 
  577  virtual std::set<std::string> 
Tables() { 
return b_->Tables(); }
 
 
  590      rtn = (*x) < cond->
val.
cast<T>();
 
  594      rtn = (*x) > cond->
val.
cast<T>();
 
  598      rtn = (*x) <= cond->
val.
cast<T>();
 
  602      rtn = (*x) >= cond->
val.
cast<T>();
 
  606      rtn = (*x) == cond->
val.
cast<T>();
 
  610      rtn = (*x) != cond->
val.
cast<T>();
 
 
  619inline bool CmpConds(T* x, std::vector<Cond*>* conds) {
 
  621  for (i = 0; i < conds->size(); ++i)
 
 
  628using Digest = std::array<CYCLUS_SHA1_ELEM_TYPE, CYCLUS_SHA1_NINT>;
 
  632  Sha1() { hash_ = boost::uuids::detail::sha1(); }
 
  635  inline void Clear() { hash_.reset(); }
 
  639  inline void Update(
const std::string& s) {
 
  640    hash_.process_bytes(s.c_str(), s.size());
 
 
  645  inline void Update(
const std::vector<int>& x) {
 
  646    hash_.process_bytes(&x[0], x.size() * 
sizeof(
int));
 
 
  649  inline void Update(
const std::vector<float>& x) {
 
  650    hash_.process_bytes(&x[0], x.size() * 
sizeof(
float));
 
 
  653  inline void Update(
const std::vector<double>& x) {
 
  654    hash_.process_bytes(&x[0], x.size() * 
sizeof(
double));
 
 
  657  inline void Update(
const std::vector<std::string>& x) {
 
  658    for (
unsigned int i = 0; i < x.size(); ++i)
 
  659      hash_.process_bytes(x[i].c_str(), x[i].size());
 
 
  662  inline void Update(
const std::vector<cyclus::Blob>& x) {
 
  663    for (
unsigned int i = 0; i < x.size(); ++i)
 
  664      hash_.process_bytes(x[i].str().c_str(), x[i].str().size());
 
 
  667  inline void Update(
const std::vector<boost::uuids::uuid>& x) {
 
  668    std::vector<boost::uuids::uuid>::const_iterator it = x.begin();
 
  669    for (; it != x.end(); ++it)
 
 
  673  inline void Update(
const std::set<int>& x) {
 
  674    std::set<int>::iterator it = x.begin();
 
  675    for (; it != x.end(); ++it)
 
  676      hash_.process_bytes(&(*it), 
sizeof(
int));
 
 
  679  inline void Update(
const std::set<bool>& x) {
 
  680    std::set<bool>::iterator it = x.begin();
 
  681    for (; it != x.end(); ++it)
 
  682      hash_.process_bytes(&(*it), 
sizeof(
bool));
 
 
  685  inline void Update(
const std::set<double>& x) {
 
  686    std::set<double>::iterator it = x.begin();
 
  687    for (; it != x.end(); ++it)
 
  688      hash_.process_bytes(&(*it), 
sizeof(
double));
 
 
  691  inline void Update(
const std::set<float>& x) {
 
  692    std::set<float>::iterator it = x.begin();
 
  693    for (; it != x.end(); ++it)
 
  694      hash_.process_bytes(&(*it), 
sizeof(
float));
 
 
  697  inline void Update(
const std::set<cyclus::Blob>& x) {
 
  698    std::set<cyclus::Blob>::iterator it = x.begin();
 
  699    for (; it != x.end(); ++it)
 
  700      hash_.process_bytes(it->str().c_str(), it->str().size());
 
 
  703  inline void Update(
const std::set<boost::uuids::uuid>& x) {
 
  704    std::set<boost::uuids::uuid>::iterator it = x.begin();
 
  705    for (; it != x.end(); ++it)
 
 
  709  inline void Update(
const std::set<std::string>& x) {
 
  710    std::set<std::string>::iterator it = x.begin();
 
  711    for (; it != x.end(); ++it)
 
  712      hash_.process_bytes(it->c_str(), it->size());
 
 
  715  inline void Update(
const std::list<int>& x) {
 
  716    std::list<int>::const_iterator it = x.begin();
 
  717    for (; it != x.end(); ++it)
 
  718      hash_.process_bytes(&(*it), 
sizeof(
int));
 
 
  721  inline void Update(
const std::list<bool>& x) {
 
  722    std::list<bool>::const_iterator it = x.begin();
 
  723    for (; it != x.end(); ++it)
 
  724      hash_.process_bytes(&(*it), 
sizeof(
bool));
 
 
  727  inline void Update(
const std::list<double>& x) {
 
  728    std::list<double>::const_iterator it = x.begin();
 
  729    for (; it != x.end(); ++it)
 
  730      hash_.process_bytes(&(*it), 
sizeof(
double));
 
 
  733  inline void Update(
const std::list<float>& x) {
 
  734    std::list<float>::const_iterator it = x.begin();
 
  735    for (; it != x.end(); ++it)
 
  736      hash_.process_bytes(&(*it), 
sizeof(
float));
 
 
  739  inline void Update(
const std::list<std::string>& x) {
 
  740    std::list<std::string>::const_iterator it = x.begin();
 
  741    for (; it != x.end(); ++it)
 
  742      hash_.process_bytes(it->c_str(), it->size());
 
 
  745  inline void Update(
const std::list<cyclus::Blob>& x) {
 
  746    std::list<cyclus::Blob>::const_iterator it = x.begin();
 
  747    for (; it != x.end(); ++it)
 
  748      hash_.process_bytes(it->str().c_str(), it->str().size());
 
 
  751  inline void Update(
const std::list<boost::uuids::uuid>& x) {
 
  752    std::list<boost::uuids::uuid>::const_iterator it = x.begin();
 
  753    for (; it != x.end(); ++it)
 
 
  757  inline void Update(
const std::pair<int, int>& x) {
 
  758    hash_.process_bytes(&(x.first), 
sizeof(
int));
 
  759    hash_.process_bytes(&(x.second), 
sizeof(
int));
 
 
  762  inline void Update(
const std::pair<int, std::string>& x) {
 
  763    hash_.process_bytes(&(x.first), 
sizeof(
int));
 
  764    hash_.process_bytes(x.second.c_str(), x.second.size());
 
 
  767  inline void Update(
const std::map<int, int>& x) {
 
  768    std::map<int, int>::const_iterator it = x.begin();
 
  769    for (; it != x.end(); ++it) {
 
  770      hash_.process_bytes(&(it->first), 
sizeof(
int));
 
  771      hash_.process_bytes(&(it->second), 
sizeof(
int));
 
 
  775  inline void Update(
const std::map<int, bool>& x) {
 
  776    std::map<int, bool>::const_iterator it = x.begin();
 
  777    for (; it != x.end(); ++it) {
 
  778      hash_.process_bytes(&(it->first), 
sizeof(
int));
 
  779      hash_.process_bytes(&(it->second), 
sizeof(
bool));
 
 
  783  inline void Update(
const std::map<int, double>& x) {
 
  784    std::map<int, double>::const_iterator it = x.begin();
 
  785    for (; it != x.end(); ++it) {
 
  786      hash_.process_bytes(&(it->first), 
sizeof(
int));
 
  787      hash_.process_bytes(&(it->second), 
sizeof(
double));
 
 
  791  inline void Update(
const std::map<int, float>& x) {
 
  792    std::map<int, float>::const_iterator it = x.begin();
 
  793    for (; it != x.end(); ++it) {
 
  794      hash_.process_bytes(&(it->first), 
sizeof(
int));
 
  795      hash_.process_bytes(&(it->second), 
sizeof(
float));
 
 
  799  inline void Update(
const std::map<int, cyclus::Blob>& x) {
 
  800    std::map<int, cyclus::Blob>::const_iterator it = x.begin();
 
  801    for (; it != x.end(); ++it) {
 
  802      hash_.process_bytes(&(it->first), 
sizeof(
int));
 
  803      hash_.process_bytes(it->second.str().c_str(), it->second.str().size());
 
 
  807  inline void Update(
const std::map<int, boost::uuids::uuid>& x) {
 
  808    std::map<int, boost::uuids::uuid>::const_iterator it = x.begin();
 
  809    for (; it != x.end(); ++it) {
 
  810      hash_.process_bytes(&(it->first), 
sizeof(
int));
 
 
  815  inline void Update(
const std::map<int, std::string>& x) {
 
  816    std::map<int, std::string>::const_iterator it = x.begin();
 
  817    for (; it != x.end(); ++it) {
 
  818      hash_.process_bytes(&(it->first), 
sizeof(
int));
 
  819      hash_.process_bytes(it->second.c_str(), it->second.size());
 
 
  823  inline void Update(
const std::map<std::string, int>& x) {
 
  824    std::map<std::string, int>::const_iterator it = x.begin();
 
  825    for (; it != x.end(); ++it) {
 
  826      hash_.process_bytes(it->first.c_str(), it->first.size());
 
  827      hash_.process_bytes(&(it->second), 
sizeof(
int));
 
 
  831  inline void Update(
const std::map<std::string, double>& x) {
 
  832    std::map<std::string, double>::const_iterator it = x.begin();
 
  833    for (; it != x.end(); ++it) {
 
  834      hash_.process_bytes(it->first.c_str(), it->first.size());
 
  835      hash_.process_bytes(&(it->second), 
sizeof(
double));
 
 
  839  inline void Update(
const std::map<std::string, float>& x) {
 
  840    std::map<std::string, float>::const_iterator it = x.begin();
 
  841    for (; it != x.end(); ++it) {
 
  842      hash_.process_bytes(it->first.c_str(), it->first.size());
 
  843      hash_.process_bytes(&(it->second), 
sizeof(
float));
 
 
  847  inline void Update(
const std::map<std::string, bool>& x) {
 
  848    std::map<std::string, bool>::const_iterator it = x.begin();
 
  849    for (; it != x.end(); ++it) {
 
  850      hash_.process_bytes(it->first.c_str(), it->first.size());
 
  851      hash_.process_bytes(&(it->second), 
sizeof(
bool));
 
 
  855  inline void Update(
const std::map<std::string, cyclus::Blob>& x) {
 
  856    std::map<std::string, cyclus::Blob>::const_iterator it = x.begin();
 
  857    for (; it != x.end(); ++it) {
 
  858      hash_.process_bytes(it->first.c_str(), it->first.size());
 
  859      hash_.process_bytes(it->second.str().c_str(), it->second.str().size());
 
 
  863  inline void Update(
const std::map<std::string, boost::uuids::uuid>& x) {
 
  864    std::map<std::string, boost::uuids::uuid>::const_iterator it = x.begin();
 
  865    for (; it != x.end(); ++it) {
 
  866      hash_.process_bytes(it->first.c_str(), it->first.size());
 
 
  871  inline void Update(
const std::map<std::string, std::string>& x) {
 
  872    std::map<std::string, std::string>::const_iterator it = x.begin();
 
  873    for (; it != x.end(); ++it) {
 
  874      hash_.process_bytes(it->first.c_str(), it->first.size());
 
  875      hash_.process_bytes(it->second.c_str(), it->second.size());
 
 
  879  inline void Update(
const std::map<std::pair<int, std::string>, 
double>& x) {
 
  880    std::map<std::pair<int, std::string>, 
double>::const_iterator it = x.begin();
 
  881    for (; it != x.end(); ++it) {
 
  882      hash_.process_bytes(&(it->first.first), 
sizeof(
int));
 
  883      hash_.process_bytes(it->first.second.c_str(), it->first.second.size());
 
  884      hash_.process_bytes(&(it->second), 
sizeof(
double));
 
 
  888  inline void Update(
const std::map<std::pair<std::string, std::string>, 
int>& x) {
 
  889    std::map<std::pair<std::string, std::string>, 
int>::const_iterator it = x.begin();
 
  890    for (; it != x.end(); ++it) {
 
  891      hash_.process_bytes(it->first.first.c_str(), it->first.first.size());
 
  892      hash_.process_bytes(it->first.second.c_str(), it->first.second.size());
 
  893      hash_.process_bytes(&(it->second), 
sizeof(
int));
 
 
  897  inline void Update(
const std::map<std::string, std::vector<double>>& x) {
 
  898    std::map<std::string, std::vector<double>>::const_iterator it = x.begin();
 
  899    for (; it != x.end(); ++it) {
 
  900      hash_.process_bytes(it->first.c_str(), it->first.size());
 
 
  905  inline void Update(
const std::map<std::string, std::map<int, double>>& x) {
 
  906    std::map<std::string, std::map<int, double>>::const_iterator it = x.begin();
 
  907    for (; it != x.end(); ++it) {
 
  908      hash_.process_bytes(it->first.c_str(), it->first.size());
 
 
  913  inline void Update(
const std::map<
int, std::map<std::string, double>>& x) {
 
  914    std::map<int, std::map<std::string, double>>::const_iterator it = x.begin();
 
  915    for (; it != x.end(); ++it) {
 
  916      hash_.process_bytes(&(it->first), 
sizeof(
int));
 
 
  921  inline void Update(
const std::pair<
double, std::map<int, double>>& x) {
 
  922    hash_.process_bytes(&(x.first), 
sizeof(
double));
 
 
  926  inline void Update(
const std::map<std::string, std::pair<
double, std::map<int, double>>>& x) {
 
  927    std::map<std::string, std::pair<double, std::map<int, double>>>::const_iterator it = x.begin();
 
  928    for (; it != x.end(); ++it) {
 
  929      hash_.process_bytes(&(it->first), it->first.size());
 
 
  934  inline void Update(
const std::pair<
int, std::pair<std::string, std::string>>& x) {
 
  935    hash_.process_bytes(&(x.first), 
sizeof(
int));
 
  936    hash_.process_bytes(x.second.first.c_str(), x.second.first.size());
 
  937    hash_.process_bytes(x.second.second.c_str(), x.second.second.size());
 
 
  940  inline void Update(
const std::vector<std::pair<
int, std::pair<std::string, std::string>>>& x) {
 
  941    std::vector<std::pair<int, std::pair<std::string, std::string>>>::const_iterator it = x.begin();
 
  942    for (; it != x.end(); ++it) {
 
 
  947  inline void Update(
const std::map<std::string, std::vector<std::pair<
int, std::pair<std::string, std::string>>>>& x) {
 
  948    std::map<std::string, std::vector<std::pair<int, std::pair<std::string, std::string>>>>::const_iterator it = x.begin();
 
  949    for (; it != x.end(); ++it) {
 
  950      hash_.process_bytes(it->first.c_str(), it->first.size());
 
 
  955  inline void Update(
const std::list<std::pair<int, int>>& x){
 
  956    std::list<std::pair<int, int>>::const_iterator it = x.begin();
 
  957    for (; it != x.end(); ++it) {
 
 
  962  inline void Update(
const std::pair<std::string, std::vector<double>>& x) {
 
  963    hash_.process_bytes(x.first.c_str(), x.first.size());
 
 
  967  inline void Update(
const std::map<std::string, std::pair<std::string, std::vector<double>>>& x) {
 
  968    std::map<std::string, std::pair<std::string, std::vector<double>>>::const_iterator it = x.begin();
 
  969    for(; it != x.end(); ++it) {
 
  970      hash_.process_bytes(it->first.c_str(), it->first.size());
 
 
  975  inline void Update(
const std::map<std::string, std::map<std::string, int>>& x) {
 
  976    std::map<std::string, std::map<std::string, int>>::const_iterator it = x.begin();
 
  977    for(; it != x.end(); ++it) {
 
  978      hash_.process_bytes(it->first.c_str(), it->first.size());
 
 
  983  inline void Update(
const std::pair<double, double>& x) {
 
  984    hash_.process_bytes(&(x.first), 
sizeof(
double));
 
  985    hash_.process_bytes(&(x.second), 
sizeof(
double));
 
 
  988  inline void Update(
const std::pair<std::pair<double, double>, std::map<std::string, double>>& x) {
 
 
  993  inline void Update(
const std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>& x) {
 
  994    std::vector<std::pair<std::pair<double, double>, std::map<std::string, double>>>::const_iterator it = x.begin();
 
  995    for(; it != x.end(); ++it) {
 
 
 1000  inline void Update(
const std::map<std::string, std::map<std::string, double>>& x) {
 
 1001    std::map<std::string, std::map<std::string, double>>::const_iterator it = x.begin();
 
 1002    for(; it != x.end(); ++it) {
 
 1003      hash_.process_bytes(it->first.c_str(), it->first.size());
 
 
 1012    const unsigned int bits_per_byte = std::numeric_limits<unsigned char>::digits;
 
 1013    #if BOOST_VERSION_MINOR < 86 
 1018    hash_.get_digest(tmp);
 
 1021        #if BOOST_VERSION_MINOR < 86 
 1025            unsigned int shift_amount;
 
 1026            for (
size_t byte = 0; 
byte < block_size; ++byte) {
 
 1027                #if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ 
 1028                    shift_amount = 
byte * bits_per_byte; 
 
 1030                    shift_amount = (block_size - 
byte - 1) * bits_per_byte;
 
 1032                elem |= tmp[i*block_size + byte] << shift_amount;
 
 
 1041  boost::uuids::detail::sha1 hash_;
 
 
A type to represent variable-length array of bytes for dumping to a cyclus output database.
virtual std::set< std::string > Tables()
Return a set of all table names currently in the database.
virtual std::map< std::string, DbTypes > ColumnTypes(std::string table)
Return a map of column names of the specified table to the associated database type.
CondInjector(QueryableBackend *b, std::vector< Cond > to_inject)
virtual QueryResult Query(std::string table, std::vector< Cond > *conds)
Return a set of rows from the specificed table that match all given conditions.
virtual std::list< ColumnInfo > Schema(std::string table)
Return information about all columns of a table.
Represents a condition used to filter rows returned by a query.
std::string op
One of: "<", ">", "<=", ">=", "==", "!=".
Cond(std::string field, std::string op, boost::spirit::hold_any val)
boost::spirit::hold_any val
value supported by backend(s) in use
CmpOpCode opcode
The CmpOpCode cooresponding to op.
std::string field
table column name
Interface implemented by backends that support recording and querying.
For failed retrieval/insertion of key-based data into/from data structures.
virtual std::list< ColumnInfo > Schema(std::string table)
Return information about all columns of a table.
virtual QueryResult Query(std::string table, std::vector< Cond > *conds)
Return a set of rows from the specificed table that match all given conditions.
virtual std::map< std::string, DbTypes > ColumnTypes(std::string table)
Return a map of column names of the specified table to the associated database type.
PrefixInjector(QueryableBackend *b, std::string prefix)
virtual std::set< std::string > Tables()
Return a set of all table names currently in the database.
Meta data and results of a query.
std::vector< QueryRow > rows
ordered results of a query
std::vector< DbTypes > types
types of each field returned by a query.
std::vector< std::string > fields
names of each field returned by a query
T GetVal(std::string field, int row=0)
Convenience method for retrieving a value from a specific row and named field (column).
Interface implemented by backends that support rudimentary querying.
virtual std::map< std::string, DbTypes > ColumnTypes(std::string table)=0
Return a map of column names of the specified table to the associated database type.
virtual std::list< ColumnInfo > Schema(std::string table)=0
Return information about all columns of a table.
virtual ~QueryableBackend()
virtual QueryResult Query(std::string table, std::vector< Cond > *conds)=0
Return a set of rows from the specificed table that match all given conditions.
virtual std::set< std::string > Tables()=0
Return a set of all table names currently in the database.
An abstract base class for listeners (e.g.
void Update(const std::pair< std::string, std::vector< double > > &x)
void Update(const std::map< std::pair< std::string, std::string >, int > &x)
void Update(const std::map< int, std::map< std::string, double > > &x)
void Update(const std::map< std::string, cyclus::Blob > &x)
void Update(const std::map< std::string, double > &x)
void Update(const std::pair< double, std::map< int, double > > &x)
void Update(const Blob &b)
void Update(const std::set< std::string > &x)
void Update(const std::set< int > &x)
void Update(const std::list< cyclus::Blob > &x)
void Update(const std::set< double > &x)
void Update(const std::pair< double, double > &x)
void Update(const std::vector< int > &x)
void Update(const std::map< int, int > &x)
void Update(const std::list< std::pair< int, int > > &x)
void Update(const std::map< std::string, bool > &x)
void Update(const std::map< int, boost::uuids::uuid > &x)
void Update(const std::map< std::string, std::vector< std::pair< int, std::pair< std::string, std::string > > > > &x)
void Update(const std::pair< int, int > &x)
void Update(const std::pair< int, std::string > &x)
void Update(const std::set< float > &x)
void Update(const std::map< std::string, std::map< std::string, int > > &x)
void Update(const std::list< bool > &x)
void Update(const std::vector< double > &x)
void Update(const std::map< int, double > &x)
void Update(const std::map< int, float > &x)
void Update(const std::list< float > &x)
void Update(const std::vector< std::string > &x)
void Clear()
Clears the current hash value to its default state.
void Update(const std::map< std::string, float > &x)
void Update(const std::map< std::pair< int, std::string >, double > &x)
void Update(const std::map< std::string, std::map< int, double > > &x)
void Update(const std::list< std::string > &x)
void Update(const std::map< int, std::string > &x)
void Update(const std::list< boost::uuids::uuid > &x)
void Update(const std::map< std::string, std::vector< double > > &x)
void Update(const std::list< double > &x)
void Update(const std::map< int, bool > &x)
void Update(const std::list< int > &x)
void Update(const std::vector< boost::uuids::uuid > &x)
void Update(const std::pair< int, std::pair< std::string, std::string > > &x)
void Update(const std::vector< std::pair< std::pair< double, double >, std::map< std::string, double > > > &x)
void Update(const std::pair< std::pair< double, double >, std::map< std::string, double > > &x)
void Update(const std::vector< float > &x)
void Update(const std::set< cyclus::Blob > &x)
void Update(const std::map< std::string, std::map< std::string, double > > &x)
void Update(const std::map< std::string, int > &x)
void Update(const std::vector< cyclus::Blob > &x)
void Update(const std::set< bool > &x)
void Update(const std::map< int, cyclus::Blob > &x)
void Update(const std::set< boost::uuids::uuid > &x)
void Update(const std::map< std::string, std::pair< double, std::map< int, double > > > &x)
void Update(const std::map< std::string, std::pair< std::string, std::vector< double > > > &x)
void Update(const std::vector< std::pair< int, std::pair< std::string, std::string > > > &x)
void Update(const std::map< std::string, std::string > &x)
void Update(const std::string &s)
Updates the hash value in-place.
void Update(const std::map< std::string, boost::uuids::uuid > &x)
For failed object state expectations.
For values that are too big, too small, etc.
basic_hold_any< char > hold_any
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
CmpOpCode
Represents operation codes for condition checking.
DbTypes
This is the primary list of all supported database types.
@ PAIR_VL_STRING_VL_STRING
@ VL_MAP_STRING_VL_MAP_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_MAP_STRING_INT
@ MAP_VL_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE
@ VL_MAP_STRING_MAP_INT_DOUBLE
@ VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_STRING_VECTOR_DOUBLE
@ VL_MAP_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE
@ PAIR_STRING_VECTOR_DOUBLE
@ PAIR_STRING_VL_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_MAP_VL_STRING_DOUBLE
@ VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE
@ MAP_STRING_PAIR_VL_STRING_VECTOR_DOUBLE
@ MAP_VL_STRING_PAIR_STRING_VECTOR_DOUBLE
@ MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE
@ MAP_VL_STRING_VL_STRING
@ VL_MAP_VL_STRING_MAP_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_STRING
@ VL_MAP_STRING_VL_MAP_INT_DOUBLE
@ MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE
@ VL_MAP_STRING_VL_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_PAIR_VL_STRING_VECTOR_DOUBLE
@ PAIR_VL_STRING_VECTOR_DOUBLE
@ VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ PAIR_DOUBLE_VL_MAP_INT_DOUBLE
@ MAP_STRING_MAP_STRING_DOUBLE
@ VL_MAP_STRING_PAIR_VL_STRING_VECTOR_DOUBLE
@ VL_MAP_STRING_MAP_STRING_INT
@ MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE
@ MAP_INT_VL_MAP_STRING_DOUBLE
@ MAP_INT_MAP_STRING_DOUBLE
@ MAP_VL_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_VECTOR_DOUBLE
@ MAP_STRING_VECTOR_DOUBLE
@ PAIR_INT_PAIR_STRING_STRING
@ MAP_PAIR_STRING_VL_STRING_INT
@ VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_MAP_VL_STRING_INT
@ VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_STRING_PAIR_STRING_VL_VECTOR_DOUBLE
@ VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_VL_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE
@ MAP_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE
@ VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ MAP_STRING_VL_MAP_STRING_INT
@ VL_MAP_INT_MAP_VL_STRING_DOUBLE
@ MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_VL_STRING_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_PAIR_STRING_VECTOR_DOUBLE
@ MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ MAP_VL_STRING_MAP_VL_STRING_INT
@ VL_MAP_STRING_VL_MAP_STRING_INT
@ VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ VL_MAP_PAIR_STRING_VL_STRING_INT
@ VL_MAP_STRING_MAP_VL_STRING_INT
@ VL_MAP_STRING_MAP_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_PAIR_VL_STRING_STRING_INT
@ VL_MAP_STRING_MAP_STRING_DOUBLE
@ VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE
@ MAP_STRING_MAP_STRING_INT
@ VL_MAP_INT_VL_MAP_VL_STRING_DOUBLE
@ VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ MAP_VL_STRING_VL_MAP_VL_STRING_DOUBLE
@ MAP_PAIR_INT_STRING_DOUBLE
@ VL_MAP_INT_MAP_STRING_DOUBLE
@ VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE
@ PAIR_INT_PAIR_VL_STRING_VL_STRING
@ MAP_STRING_VL_MAP_VL_STRING_INT
@ MAP_VL_STRING_PAIR_STRING_VL_VECTOR_DOUBLE
@ PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE
@ VL_MAP_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE
@ MAP_VL_STRING_VL_MAP_VL_STRING_INT
@ MAP_VL_STRING_VL_MAP_STRING_INT
@ MAP_STRING_MAP_VL_STRING_DOUBLE
@ VL_MAP_STRING_VL_STRING
@ VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_PAIR_STRING_STRING_INT
@ MAP_PAIR_VL_STRING_VL_STRING_INT
@ MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_VL_STRING_MAP_VL_STRING_DOUBLE
@ MAP_STRING_VL_MAP_INT_DOUBLE
@ PAIR_INT_PAIR_VL_STRING_STRING
@ VL_MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_STRING_VL_MAP_STRING_DOUBLE
@ MAP_VL_STRING_VL_MAP_STRING_DOUBLE
@ VL_MAP_PAIR_INT_STRING_DOUBLE
@ VL_MAP_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_INT_MAP_VL_STRING_DOUBLE
@ VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ RES_MAP_VL_STRING_PRODUCT
@ VL_MAP_STRING_PAIR_STRING_VECTOR_DOUBLE
@ MAP_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE
@ MAP_VL_STRING_MAP_STRING_DOUBLE
@ MAP_VL_STRING_VL_MAP_INT_DOUBLE
@ MAP_VL_STRING_PAIR_VL_STRING_VECTOR_DOUBLE
@ MAP_STRING_PAIR_STRING_VECTOR_DOUBLE
@ VL_MAP_VL_STRING_PAIR_STRING_VL_VECTOR_DOUBLE
@ MAP_STRING_VL_MAP_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ MAP_STRING_PAIR_STRING_VL_VECTOR_DOUBLE
@ MAP_PAIR_INT_VL_STRING_DOUBLE
@ MAP_STRING_PAIR_VL_STRING_VL_VECTOR_DOUBLE
@ MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_VL_MAP_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_STRING
@ VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_VL_STRING_PAIR_DOUBLE_MAP_INT_DOUBLE
@ VL_MAP_VL_STRING_MAP_VL_STRING_INT
@ VL_MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ VL_MAP_VL_STRING_VL_MAP_STRING_DOUBLE
@ VL_MAP_VL_STRING_PAIR_DOUBLE_VL_MAP_INT_DOUBLE
@ MAP_STRING_MAP_INT_DOUBLE
@ MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_VL_STRING
@ VL_MAP_VL_STRING_VL_MAP_INT_DOUBLE
@ VL_MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_VL_STRING_STRING
@ VL_MAP_INT_VL_MAP_STRING_DOUBLE
@ VL_MAP_STRING_VL_MAP_VL_STRING_INT
@ VL_MAP_PAIR_VL_STRING_VL_STRING_INT
@ VL_MAP_VL_STRING_DOUBLE
@ VL_MAP_PAIR_INT_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_VECTOR_DOUBLE
@ MAP_VL_STRING_MAP_STRING_INT
@ MAP_INT_VL_MAP_VL_STRING_DOUBLE
@ MAP_VL_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ RES_MAP_STRING_MATERIAL
@ VL_VECTOR_PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE
@ MAP_STRING_VL_MAP_STRING_DOUBLE
@ MAP_VL_STRING_VL_VECTOR_DOUBLE
@ VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ MAP_PAIR_VL_STRING_STRING_INT
@ PAIR_INT_PAIR_STRING_VL_STRING
@ VL_MAP_VL_STRING_VL_MAP_STRING_INT
@ MAP_STRING_VL_VECTOR_DOUBLE
@ PAIR_DOUBLE_MAP_INT_DOUBLE
@ MAP_STRING_MAP_VL_STRING_INT
@ VL_MAP_VL_STRING_MAP_INT_DOUBLE
@ MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ PAIR_PAIR_DOUBLE_DOUBLE_MAP_VL_STRING_DOUBLE
@ VL_MAP_VL_STRING_VL_MAP_VL_STRING_DOUBLE
@ VL_MAP_STRING_VECTOR_PAIR_INT_PAIR_STRING_VL_STRING
@ MAP_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ MAP_VL_STRING_MAP_INT_DOUBLE
@ MAP_VL_STRING_VL_VECTOR_PAIR_INT_PAIR_STRING_STRING
@ RES_MAP_VL_STRING_MATERIAL
@ PAIR_PAIR_DOUBLE_DOUBLE_MAP_STRING_DOUBLE
@ VL_MAP_PAIR_STRING_STRING_INT
@ PAIR_VL_STRING_VL_VECTOR_DOUBLE
std::vector< boost::spirit::hold_any > QueryRow
bool CmpCond(T *x, Cond *cond)
Compares a condiontion for a single value.
std::array< CYCLUS_SHA1_ELEM_TYPE, CYCLUS_SHA1_NINT > Digest
The digest type for SHA1s.
bool CmpConds(T *x, std::vector< Cond * > *conds)
Compares all condiontions for a value.
unsigned int CYCLUS_SHA1_ELEM_TYPE
ColumnInfo(std::string default_table, std::string default_col, int default_index, DbTypes default_dbtype, std::vector< int > default_shape)