Column-oriented GPU-accelerated Database Management System
CoGaDB
/home/sebastian/gpudbms/trunk/cogadb/include/core/selection_expression.hpp
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <core/global_definitions.hpp>
00004 #include <string>
00005 #include <vector>
00006 #include <boost/any.hpp>
00007 #include <assert.h>
00008 
00009 namespace CoGaDB {
00010 
00011 
00012     class Predicate {
00013     public:
00014         Predicate(const std::string& column1_name, const std::string& column2_name, PredicateType pred_t, ValueComparator comp);
00015         Predicate(const std::string& column1_name, const boost::any& constant, PredicateType pred_t, ValueComparator comp);
00016         PredicateType getPredicateType() const;
00017         const std::string& getColumn1Name() const;
00018         const std::string& getColumn2Name() const;
00019         const boost::any& getConstant() const;
00020         ValueComparator getValueComparator() const;
00021         void print() const;
00022         std::string toString() const;
00023     private:
00024         PredicateType pred_t_;
00025         std::string column1_name_;
00026         std::string column2_name_;
00027         boost::any constant_;
00028         ValueComparator comp_;
00029 
00030     };
00031 
00032     struct KNF_Selection_Expression {
00033         typedef std::vector<Predicate> Disjunction;
00034 
00035         std::vector<Disjunction> disjunctions;
00036 
00037     };
00038   
00039     typedef KNF_Selection_Expression::Disjunction Disjunction;
00040 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines