3#ifndef STREAMBASE_DATA_TYPE_H
4#define STREAMBASE_DATA_TYPE_H
6#include "StreamBase.hpp"
9#include "Exceptions.hpp"
31#ifndef DOXYGEN_INTERNAL_ONLY
57 operator int()
const {
return _type; }
64 sprintf(buf,
"unknown[%d]", _type);
66 case NONE:
return "none";
67 case INT:
return "int";
68 case DOUBLE:
return "double";
69 case STRING:
return "string";
70 case TIMESTAMP:
return "timestamp";
71 case LONG:
return "long";
72 case BOOL:
return "bool";
73 case BLOB:
return "blob";
74 case TUPLE:
return "tuple";
75 case LIST:
return "list";
76 case CAPTURE:
return "capture";
77 case FUNCTION:
return "function";
83 size_t getSize()
const {
102 "Unrecognized or invalid data type: " + as_string()));
114inline bool operator == (
const DataType& a, DataType::Rep b) {
return a == DataType(b); }
115inline bool operator == (DataType::Rep b,
const DataType& a) {
return a == DataType(b); }
A type of data in a tuple.
Definition: DataType.hpp:29
DataType()
Construct a DataType equal to DataType::NONE.
Definition: DataType.hpp:51
std::string as_string() const
Return a string representation of the data type.
Definition: DataType.hpp:61
static bool isFixedSize(DataType type)
Return false if the type is variable-length (e.g., STRING or BLOB)
Definition: DataType.hpp:108
Illegal Argument.
Definition: Exceptions.hpp:228