1 #ifndef CARMA_DBMS_SETFILTER_H
2 #define CARMA_DBMS_SETFILTER_H
37 SetFilter(
const std::set<T>& values,
const std::string& columnName)
39 if(values.size() == 0) {
40 std::string emsg =
"Number of elements in values set must be ";
41 emsg +=
"greater than 0";
44 columnName_ = columnName;
52 std::set<T> getValues()
const {
return values_; }
61 virtual std::string
toString(
const std::string& tableName,
62 const std::string& columnName)
const {
63 std::ostringstream ss;
64 ss << fullyQualifiedColumnName_(tableName,columnName);
65 ss <<
" IN (" << carma::util::setToString(values_) <<
")";
73 virtual std::string
name()
const {
83 #endif // CARMA_DBMS_SETFILTER_H
virtual std::string name() const
get the class name for use in log messages etc
an exception indicating that an object is in an illegal state for the operation that was called on or...
abstract base class to represent an SQL query one component filter (part of a WHERE clause) ...
SetFilter(const std::set< T > &values, const std::string &columnName)
constuctor
virtual std::string toString(const std::string &tableName, const std::string &columnName) const
string representation of the filter.
abstract base class to represent a simple one component filter
IllegalArgumentException class.
virtual ~SetFilter()
destructor, derived classes may want to override
#define CARMA_EXCEPTION(x, y)
Trick to get the file name and line number passed to the exception handler.
template to represent a one component set search filter (viz.