public function __toString()
{
switch ($this->type) {
case DataTypeEnum::CUSTOM:
case DataTypeEnum::BLOB:
return $this->getBlob();
case DataTypeEnum::TIMESTAMP:
return $this->getTimestamp();
case DataTypeEnum::COUNTER:
case DataTypeEnum::BIGINT:
return $this->getBigInt();
case DataTypeEnum::VARINT:
return $this->getVarInt();
case DataTypeEnum::BOOLEAN:
return $this->getBoolean();
case DataTypeEnum::COLLECTION_SET:
case DataTypeEnum::COLLECTION_LIST:
return $this->getList();
case DataTypeEnum::COLLECTION_MAP:
return $this->getMap();
case DataTypeEnum::DECIMAL:
return $this->getDecimal();
case DataTypeEnum::DOUBLE:
return $this->getDouble();
case DataTypeEnum::FLOAT:
return $this->getFloat();
case DataTypeEnum::INET:
return $this->getInet();
case DataTypeEnum::INT:
return $this->getInt();
case DataTypeEnum::ASCII:
case DataTypeEnum::VARCHAR:
case DataTypeEnum::TEXT:
return $this->getText();
case DataTypeEnum::TIMEUUID:
case DataTypeEnum::UUID:
return $this->getUUID();
default:
trigger_error('Unknown type.');
}
return '';
}