Public Types | |
enum | Type { Null = 0, NotSupported = 1, Byte = 2, Boolean = 3, String = 4, Ip = 5, Double = 6, Float = 7, Short = 8, Integer = 9, Long = 10, Timestamp = 11, Object = 12, GeoPoint = 13, GeoShape = 14, Array = 100, Set = 101 } |
Public Member Functions | |
CrateDataType (Type type=NotSupported, const std::string &definition=std::string()) | |
const std::string & | definition () const |
void | setDefinition (const std::string &definition) |
void | setType (int type) |
void | setType (Type type) |
Type | type () const |
Static Public Member Functions | |
static Type | convert (int type) |
The class CrateDataType provides information about a Crate table's column type of a query.
Describes the data type. The underlying integer corresponds to the one Crate is using: https://crate.io/docs/reference/protocols/http.html#column-types.
|
explicit |
Constructs a data type with the type type and its original definition definition.
|
static |
Returns the integer type converted into the type CrateDataType::Type. If type is not valid, CrateDataType::NotSupported is returned.
const std::string & CppCrate::CrateDataType::definition | ( | ) | const |
Returns the original definition extracted from the key col_types
.
void CppCrate::CrateDataType::setDefinition | ( | const std::string & | definition | ) |
Sets the definition to definition.
void CppCrate::CrateDataType::setType | ( | int | type | ) |
Sets the data type to type.
void CppCrate::CrateDataType::setType | ( | CrateDataType::Type | type | ) |
Sets the data type to type.
CrateDataType::Type CppCrate::CrateDataType::type | ( | ) | const |
Returns the data type.